JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... generated random number is returned in the argument result . The srandom_r () function is like srandom (3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf , which must have been ... ad of the seed associated with the global state variable. The initstate_r () function is like initstate (3) except that it initializes the state in the object pointed to by buf , rather than initializing the global state variable. Before calling this functi ... ... generated random number is returned in the argument result . The srandom_r () function is like srandom (3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf , which must have been ... ad of the seed associated with the global state variable. The initstate_r () function is like initstate (3) except that it initializes the state in the object pointed to by buf , rather than initializing the global state variable. Before calling this functi ... ... generated random number is returned in the argument result . The srandom_r () function is like srandom (3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf , which must have been ... ad of the seed associated with the global state variable. The initstate_r () function is like initstate (3) except that it initializes the state in the object pointed to by buf , rather than initializing the global state variable. Before calling this functi ... ... generated random number is returned in the argument result . The srandom_r () function is like srandom (3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf , which must have been ... ad of the seed associated with the global state variable. The initstate_r () function is like initstate (3) except that it initializes the state in the object pointed to by buf , rather than initializing the global state variable. Before calling this functi ... ... segment and a semaphore set containing one semaphore. It then attaches the shared memory object into its address space and initializes the semaphore value to 1. Finally, the program waits for the semaphore value to become 0, and afterwards prints the string ... ared memory into our address space */ addr = shmat(shmid, NULL, SHM_RDONLY); if (addr == (void *) -1) errExit("shmat"); /* Initialize semaphore 0 in set with value 1 */ arg.val = 1; if (semctl(semid, 0, SETVAL, arg) == -1) errExit("semctl"); printf("shmid = ... ... segment and a semaphore set containing one semaphore. It then attaches the shared memory object into its address space and initializes the semaphore value to 1. Finally, the program waits for the semaphore value to become 0, and afterwards prints the string ... ared memory into our address space */ addr = shmat(shmid, NULL, SHM_RDONLY); if (addr == (void *) -1) errExit("shmat"); /* Initialize semaphore 0 in set with value 1 */ arg.val = 1; if (semctl(semid, 0, SETVAL, arg) == -1) errExit("semctl"); printf("shmid = ... ... segment and a semaphore set containing one semaphore. It then attaches the shared memory object into its address space and initializes the semaphore value to 1. Finally, the program waits for the semaphore value to become 0, and afterwards prints the string ... ared memory into our address space */ addr = shmat(shmid, NULL, SHM_RDONLY); if (addr == (void *) -1) errExit("shmat"); /* Initialize semaphore 0 in set with value 1 */ arg.val = 1; if (semctl(semid, 0, SETVAL, arg) == -1) errExit("semctl"); printf("shmid = ... ... the size of the shmbuf structure defined in the header file. It then maps the object into the process's address space, and initializes two POSIX semaphores inside the object to 0. After the "send" program has posted the first of the semaphores, the "bounce" ... *shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) errExit("mmap"); /* Initialize semaphores as process-shared, with value 0 */ if (sem_init(&shmp->sem1, 1, 0) == -1) errExit("sem_init-sem1"); if (sem_init ... ... the size of the shmbuf structure defined in the header file. It then maps the object into the process's address space, and initializes two POSIX semaphores inside the object to 0. After the "send" program has posted the first of the semaphores, the "bounce" ... *shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) errExit("mmap"); /* Initialize semaphores as process-shared, with value 0 */ if (sem_init(&shmp->sem1, 1, 0) == -1) errExit("sem_init-sem1"); if (sem_init ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。