OSDN Git Service

Retire LDP man-pages repository
[linuxjm/LDP_man-pages.git] / release / man7 / sem_overview.7
diff --git a/release/man7/sem_overview.7 b/release/man7/sem_overview.7
deleted file mode 100644 (file)
index 7b2e092..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-.\" t
-.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
-.\"
-.\" %%%LICENSE_START(VERBATIM)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\"
-.\" Since the Linux kernel and libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\"
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\" %%%LICENSE_END
-.\"
-.\"*******************************************************************
-.\"
-.\" This file was generated with po4a. Translate the source file.
-.\"
-.\"*******************************************************************
-.\"
-.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
-.\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05
-.\" Updated 2009-02-23, Akihiro MOTOKI, LDP v3.19
-.\"
-.TH SEM_OVERVIEW 7 2012\-05\-13 Linux "Linux Programmer's Manual"
-.SH 名前
-sem_overview \- POSIX セマフォの概要
-.SH 説明
-POSIX セマフォを使用すると、プロセスやスレッド間でその動作を 同期させることができる。
-
-セマフォは整数であり、その値は決して 0 未満になることは許されない。 セマフォに対してできる操作は 2 つである: セマフォ値を 1 増やす
-(\fBsem_post\fP(3)); セマフォ値を 1 減らす (\fBsem_wait\fP(3))。 セマフォの値がすでに 0 の場合、セマフォ値が 0
-より大きくなるまで \fBsem_wait\fP(3)  操作は停止 (block) する。
-
-POSIX セマフォには、名前付きセマフォ (named semaphore) と 名前なしセマフォ (unnamed semaphore) の
-2つの形がある。
-.TP 
-\fB名前付きセマフォ\fP
-.\" glibc allows the initial slash to be omitted, and makes
-.\" multiple initial slashes equivalent to a single slash.
-.\" This differs from the implementation of POSIX message queues.
-.\" glibc allows subdirectory components in the name, in which
-.\" case the subdirectory tree must exist under /dev/shm, and
-.\" the fist subdirectory component must exist as the name
-.\" sem.name, and all of the subdirectory components must allow the
-.\" required permissions if a user wants to create a semaphore
-.\" object in a subdirectory.
-名前付きセマフォは \fI/somename\fP という形式の名前で識別される。 その名前は、最大で \fBNAME_MAX\fP\fI\-4\fP (すなわち 251)
-文字のヌル終端された文字列で、 スラッシュで始まり、スラッシュ以外の文字が 1 文字以上続く形式である。 \fBsem_open\fP(3)
-に同じ名前を渡すことにより、2 つのプロセス間で同じ名前のセマフォ に対し操作を行うことができる。
-
-\fBsem_open\fP(3)  関数は、新しい名前付きセマフォを作成するか、既に存在する名前付き セマフォをオープンする。 セマフォをオープンした後は、
-\fBsem_post\fP(3)  と \fBsem_wait\fP(3)  を使ってセマフォを操作できる。 プロセスがセマフォの使用を終えた際は、
-\fBsem_close\fP(3)  を使ってセマフォをクローズできる。 あるセマフォをどのプロセスも使用しなくなると、 \fBsem_unlink\fP(3)
-を使ってそのセマフォをシステムから削除することができる。
-.TP 
-\fB名前なしセマフォ (メモリーベースセマフォ)\fP
-名前なしセマフォは名前を持たない。その代わり、セマフォは、 複数スレッド間で共有されるメモリー領域、もしくは複数プロセス間で
-共有されたメモリー領域に置かれる (前者を \fIスレッド共有セマフォ (thread\-shared semaphore)\fP、 後者を
-\fIプロセス共有セマフォ (process\-shared semaphore)\fP
-と呼ぶ)。スレッド共有セマフォは、同じプロセス内のスレッド間で共有される メモリー領域、例えば大域変数 (global variable)
-に配置される。 プロセス共有セマフォは、共有メモリー領域 (例えば、 \fBshmget\fP(2)  を使って作成できる System V
-共有メモリーセグメントや \fBshm_open\fP(3)  を使って作成できる POSIX 共有メモリーオブジェクト)  内に配置しなければならない。
-
-名前なしセマフォは、使用する前に \fBsem_init\fP(3)  を使って初期化しなければならない。 セマフォは \fBsem_post\fP(3)  と
-\fBsem_wait\fP(3)  を使って操作できる。 セマフォがもはや必要なくなったときや、 セマフォが置かれているメモリーを解放する前には、
-\fBsem_destroy\fP(3)  を使ってセマフォを破棄すべきである。
-.PP
-この節の残りでは、POSIX セマフォの Linux の実装の詳細 について説明する。
-.SS Versions
-バージョン 2.6 より前のカーネルでは、Linux は 名前なしのスレッド共有セマフォのみをサポートしていた。 Linux 2.6 と NPTL
-スレッド実装を提供している glibc が入った システムでは、POSIX セマフォの完全な実装が提供される。
-.SS 持続性
-POSIX 名前付きセマフォはカーネル内で保持される。 \fBsem_unlink\fP(3)  で削除されなければ、セマフォは
-システムがシャットダウンされるまで存在し続ける。
-.SS リンク
-POSIX セマフォ API を使用したプログラムは \fIcc \-pthread\fP でコンパイルし、リアルタイムライブラリ \fIlibrt\fP
-とリンクしなければならない。
-.SS ファイルシステム経由での名前付きセマフォへのアクセス
-Linux では、名前付きセマフォは仮想ファイルシステム (virtual file system) 内に \fBsem.\fP\fIsomename\fP
-という形の名前で作成される。仮想ファイルシステムは通常 \fI/dev/shm\fP 以下にマウントされる。 (これが、セマフォの名前の文字数の上限が
-\fBNAME_MAX\fP ではなく \fBNAME_MAX\fP\fI\-4\fP となっている理由である。)
-
-Linux 2.6.19 以降では、このディレクトリ配下のファイルに対して ACL を
-設定でき、オブジェクトへの許可をユーザー単位、グループ単位で制御することが できる。
-.SH 準拠
-POSIX.1\-2001.
-.SH 注意
-System V セマフォ (\fBsemget\fP(2), \fBsemop\fP(2)  など) は古いセマフォ API である。 POSIX セマフォは
-System V よりも 簡単で、うまく設計されたインターフェースを提供している。 一方で、POSIX セマフォは System V セマフォと比べると
-利用できるシステムが少ない (特に、古いシステムでは少ない)。
-.SH 例
-各種の POSIX セマフォ関数を使用した例が \fBsem_wait\fP(3)  に記載されている。
-.SH 関連項目
-\fBsem_close\fP(3), \fBsem_destroy\fP(3), \fBsem_getvalue\fP(3), \fBsem_init\fP(3),
-\fBsem_open\fP(3), \fBsem_post\fP(3), \fBsem_unlink\fP(3), \fBsem_wait\fP(3),
-\fBpthreads\fP(7)
-.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
-である。プロジェクトの説明とバグ報告に関する情報は
-http://www.kernel.org/doc/man\-pages/ に書かれている。