#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:57+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages/man7/sem_overview.7:26 #, no-wrap msgid "SEM_OVERVIEW" msgstr "" #. type: TH #: man-pages/man7/sem_overview.7:26 #, no-wrap msgid "2012-05-13" msgstr "" #. type: TH #: man-pages/man7/sem_overview.7:26 #, no-wrap msgid "Linux" msgstr "" #. type: TH #: man-pages/man7/sem_overview.7:26 #, no-wrap msgid "Linux Programmer's Manual" msgstr "" #. type: SH #: man-pages/man7/sem_overview.7:27 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:29 msgid "sem_overview - overview of POSIX semaphores" msgstr "" #. type: SH #: man-pages/man7/sem_overview.7:29 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:31 msgid "" "POSIX semaphores allow processes and threads to synchronize their actions." msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:41 msgid "" "A semaphore is an integer whose value is never allowed to fall below zero. " "Two operations can be performed on semaphores: increment the semaphore value " "by one (B(3)); and decrement the semaphore value by one " "(B(3)). If the value of a semaphore is currently zero, then a " "B(3) operation will block until the value becomes greater than " "zero." msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:44 msgid "" "POSIX semaphores come in two forms: named semaphores and unnamed semaphores." msgstr "" #. type: TP #: man-pages/man7/sem_overview.7:44 #, no-wrap msgid "B" msgstr "" #. 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. #. type: Plain text #: man-pages/man7/sem_overview.7:64 msgid "" "A named semaphore is identified by a name of the form I; that is, " "a null-terminated string of up to BI<-4> (i.e., 251) characters " "consisting of an initial slash, followed by one or more characters, none of " "which are slashes. Two processes can operate on the same named semaphore by " "passing the same name to B(3)." msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:79 msgid "" "The B(3) function creates a new named semaphore or opens an " "existing named semaphore. After the semaphore has been opened, it can be " "operated on using B(3) and B(3). When a process has " "finished using the semaphore, it can use B(3) to close the " "semaphore. When all processes have finished using the semaphore, it can be " "removed from the system using B(3)." msgstr "" #. type: TP #: man-pages/man7/sem_overview.7:79 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:94 msgid "" "An unnamed semaphore does not have a name. Instead the semaphore is placed " "in a region of memory that is shared between multiple threads (a I) or processes (a I). A thread-" "shared semaphore is placed in an area of memory shared between the threads " "of a process, for example, a global variable. A process-shared semaphore " "must be placed in a shared memory region (e.g., a System V shared memory " "segment created using B(2), or a POSIX shared memory object built " "created using B(3))." msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:105 msgid "" "Before being used, an unnamed semaphore must be initialized using " "B(3). It can then be operated on using B(3) and " "B(3). When the semaphore is no longer required, and before the " "memory in which it is located is deallocated, the semaphore should be " "destroyed using B(3)." msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:108 msgid "" "The remainder of this section describes some specific details of the Linux " "implementation of POSIX semaphores." msgstr "" #. type: SS #: man-pages/man7/sem_overview.7:108 #, no-wrap msgid "Versions" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:114 msgid "" "Prior to kernel 2.6, Linux supported only unnamed, thread-shared semaphores. " " On a system with Linux 2.6 and a glibc that provides the NPTL threading " "implementation, a complete implementation of POSIX semaphores is provided." msgstr "" #. type: SS #: man-pages/man7/sem_overview.7:114 #, no-wrap msgid "Persistence" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:119 msgid "" "POSIX named semaphores have kernel persistence: if not removed by " "B(3), a semaphore will exist until the system is shut down." msgstr "" #. type: SS #: man-pages/man7/sem_overview.7:119 #, no-wrap msgid "Linking" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:124 msgid "" "Programs using the POSIX semaphores API must be compiled with I " "to link against the real-time library, I." msgstr "" #. type: SS #: man-pages/man7/sem_overview.7:124 #, no-wrap msgid "Accessing named semaphores via the filesystem" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:135 msgid "" "On Linux, named semaphores are created in a virtual filesystem, normally " "mounted under I, with names of the form BI. (This " "is the reason that semaphore names are limited to BI<-4> rather " "than B characters.)" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:138 msgid "" "Since Linux 2.6.19, ACLs can be placed on files under this directory, to " "control object permissions on a per-user and per-group basis." msgstr "" #. type: SH #: man-pages/man7/sem_overview.7:138 #, no-wrap msgid "CONFORMING TO" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:140 msgid "POSIX.1-2001." msgstr "" #. type: SH #: man-pages/man7/sem_overview.7:140 #, no-wrap msgid "NOTES" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:149 msgid "" "System V semaphores (B(2), B(2), etc.) are an older semaphore " "API. POSIX semaphores provide a simpler, and better designed interface than " "System V semaphores; on the other hand POSIX semaphores are less widely " "available (especially on older systems) than System V semaphores." msgstr "" #. type: SH #: man-pages/man7/sem_overview.7:149 #, no-wrap msgid "EXAMPLE" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:152 msgid "" "An example of the use of various POSIX semaphore functions is shown in " "B(3)." msgstr "" #. type: SH #: man-pages/man7/sem_overview.7:152 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:162 msgid "" "B(3), B(3), B(3), B(3), " "B(3), B(3), B(3), B(3), " "B(7)" msgstr "" #. type: SH #: man-pages/man7/sem_overview.7:162 #, no-wrap msgid "COLOPHON" msgstr "" #. type: Plain text #: man-pages/man7/sem_overview.7:170 msgid "" "This page is part of release 3.70 of the Linux I project. A " "description of the project, information about reporting bugs, and the latest " "version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/" "." msgstr ""