JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... 。そのファイルシステムは通常 /dev/shm にマウントされる。 例 The programs below employ POSIX shared memory and POSIX unnamed semaphores to exchange a piece of data. The "bounce" program (which must be run first) raises the case of a string that is placed int ... 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" program upper cases ... ap(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(&shmp->se ... ... 。そのファイルシステムは通常 /dev/shm にマウントされる。 例 The programs below employ POSIX shared memory and POSIX unnamed semaphores to exchange a piece of data. The "bounce" program (which must be run first) raises the case of a string that is placed int ... 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" program upper cases ... ap(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(&shmp->se ... ... up-ID を持つ。 影響を受ける関数は以下の通り。 exec (), kill (), seteuid (), setegid (), setgid (), setuid (). SEM - _POSIX_SEMAPHORES - _SC_SEMAPHORES インクルードファイル < semaphore.h > が存在する。 以下の関数が存在する。 sem_close (), sem_destroy (), se ... ... t nsems , int semflg ); 説明 The semget () system call returns the System V semaphore set identifier associated with the argument key . It may be used either to obtain the identifier of a previously created se ... -1 が返され、 errno にエラーを示す値が設定される。 エラー 失敗した場合は errno には以下の値のどれかが設定される: EACCES A semaphore set exists for key , but the calling process does not have permission to access the set, and does not have the CAP_IPC_OWNE ... フォ集合のリソースに関する上限のうち、 semget () に影響を及ぼすものを以下に挙げる: SEMMNI System-wide limit on the number of semaphore sets. On Linux systems before version 3.19, the default value for this limit was 128. Since Linux 3.19, the default value i ... ... mnum , int cmd , ...); 説明 semctl () は、 semid で指定された System V セマフォ集合 (semaphore set) またはセマフォ集合の semnun 番目のセマフォに対して、 cmd で指定された制御操作を行なう (集合内のセマフォの番号は 0 から ... structure are as follows: sem_perm This is an ipc_perm structure (see below) that specifies the access permissions on the semaphore set. sem_otime Time of last semop (2) system call. sem_ctime Time of creation of semaphore set or time of last semctl () IP ... CSET , SETVAL , or SETALL operation. sem_nsems Number of semaphores in the set. Each semaphore of the set is referenced by a nonnegative integer ranging from 0 to sem_nsems-1 . ipc_perm 構造 ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。