.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH SEMCTL 2 2012\-05\-31 Linux "Linux Programmer's Manual"
+.TH SEMCTL 2 2013\-06\-03 Linux "Linux Programmer's Manual"
.SH 名前
-semctl \- セマフォの制御操作を行なう
+semctl \- System V セマフォの制御操作を行なう
.SH 書式
.nf
\fB#include <sys/types.h>\fP
\fBint semctl(int \fP\fIsemid\fP\fB, int \fP\fIsemnum\fP\fB, int \fP\fIcmd\fP\fB, ...);\fP
.fi
.SH 説明
-\fBsemctl\fP() は、 \fIsemid\fP で指定されたセマフォ集合 (semaphore set) またはセマフォ集合の \fIsemnun\fP
-番目のセマフォに対して、 \fIcmd\fP で指定された制御操作を行なう (集合内のセマフォの番号は 0 から始まる)。
+\fBsemctl\fP() は、 \fIsemid\fP で指定された System V セマフォ集合 (semaphore set) またはセマフォ集合の
+\fIsemnun\fP 番目のセマフォに対して、 \fIcmd\fP で指定された制御操作を行なう (集合内のセマフォの番号は 0 から始まる)。
.PP
この関数は、 \fIcmd\fP の値に依存して、3 個または 4 個の引き数を持つ。 引き数が 4 個の場合、第 4 引き数の型は \fIunion
semun\fP である。 \fI呼び出し元プログラム\fPは、 この共用体 (union) を以下のように定義しなければならない。
struct ipc_perm sem_perm; /* 所有権と許可 */
time_t sem_otime; /* 最後の semop の時刻 */
time_t sem_ctime; /* 最後に変更が行われた時刻 */
- unsigned short sem_nsems; /* 集合内のセマフォの数 */
+ unsigned long sem_nsems; /* 集合内のセマフォの数 */
};
.in
.fi
.PP
-The \fIipc_perm\fP structure is defined as follows (the highlighted fields are
-settable using \fBIPC_SET\fP):
+\fIipc_perm\fP 構造体は以下のように定義されている (強調されたフィールドは \fBIPC_SET\fP を使って設定可能である):
.PP
.nf
.in +4n
.in
.fi
.PP
-\fIcmd\fP として有効な値は
+\fIcmd\fP として有効な値は次の通りである。
.TP 10
\fBIPC_STAT\fP
\fIsemid\fP に関連づけられたカーネルデータ構造体の情報を \fIarg.buf\fP で指された \fIsemid_ds\fP 構造体へコピーする。
.SH 準拠
.\" SVr4 documents more error conditions EINVAL and EOVERFLOW.
SVr4, POSIX.1\-2001.
+
+POSIX.1\-2001 では \fIsemid_ds\fP 構造体の \fIsem_nsems\fP フィールドは \fIunsigned\ short\fP
+型を持つと規定されており、 他のほとんどのシステムでこのフィールドは \fIunsigned\ short\fP 型になっている。 Linux 2.4
+以前ではそうなっていたが、 Linux 2.4 以降ではこのフィールドは \fIunsigned\ long\fP 型である。
.SH 注意
.\" Like Linux, the FreeBSD man pages still document
.\" the inclusion of these header files.
-The inclusion of \fI<sys/types.h>\fP and \fI<sys/ipc.h>\fP isn't
-required on Linux or by any version of POSIX. However, some old
-implementations required the inclusion of these header files, and the SVID
-also documented their inclusion. Applications intended to be portable to
-such old systems may need to include these header files.
+Linux や POSIX の全てのバージョンでは、 \fI<sys/types.h>\fP と \fI<sys/ipc.h>\fP
+のインクルードは必要ない。しかしながら、いくつかの古い実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID
+でもこれらのインクルードをするように記載されている。このような古いシステムへの移植性を意図したアプリケーションではこれらのファイルをインクルードする必要があるかもしれない。
\fBIPC_INFO\fP, \fBSEM_STAT\fP, \fBSEM_INFO\fP 操作は \fBipcs\fP(1)
プログラムによって割当られた資源について情報を提供するために使用される。 将来的にはこれらは変更されるか、 /proc
\fBipc\fP(2), \fBsemget\fP(2), \fBsemop\fP(2), \fBcapabilities\fP(7),
\fBsem_overview\fP(7), \fBsvipc\fP(7)
.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。