mirror of https://github.com/mkerrisk/man-pages
Reformatted headings; minor rewrites.
This commit is contained in:
parent
8b215c3043
commit
9bfe1b3936
|
@ -38,7 +38,8 @@ operation will block until the value becomes greater than zero.
|
||||||
|
|
||||||
POSIX semaphores come in two forms: named semaphores and
|
POSIX semaphores come in two forms: named semaphores and
|
||||||
unnamed semaphores.
|
unnamed semaphores.
|
||||||
.SS Named semaphores
|
.TP
|
||||||
|
.B Named semaphores
|
||||||
A named semaphore is identified by a name of the form
|
A named semaphore is identified by a name of the form
|
||||||
.IR /somename .
|
.IR /somename .
|
||||||
Two processes can operate on the same named semaphore by passing
|
Two processes can operate on the same named semaphore by passing
|
||||||
|
@ -59,7 +60,8 @@ to close the semaphore.
|
||||||
When all processes have finished using the semaphore,
|
When all processes have finished using the semaphore,
|
||||||
it can be removed from the system using
|
it can be removed from the system using
|
||||||
.BR sem_unlink (3).
|
.BR sem_unlink (3).
|
||||||
.SS Unnamed semaphores (memory-based semaphores)
|
.TP
|
||||||
|
.B Unnamed semaphores (memory-based semaphores)
|
||||||
An unnamed semaphore does not have a name.
|
An unnamed semaphore does not have a name.
|
||||||
Instead the semaphore is placed in a region of memory that
|
Instead the semaphore is placed in a region of memory that
|
||||||
is shared between multiple threads (a
|
is shared between multiple threads (a
|
||||||
|
@ -84,7 +86,9 @@ When the semaphore is no longer required,
|
||||||
and before the memory in which it is located is deallocated,
|
and before the memory in which it is located is deallocated,
|
||||||
the semaphore should be destroyed using
|
the semaphore should be destroyed using
|
||||||
.BR sem_destroy (3).
|
.BR sem_destroy (3).
|
||||||
.SH LINUX SPECIFIC DETAILS
|
.PP
|
||||||
|
The remainder of this section describes some specific details
|
||||||
|
of the Linux implementation of POSIX semaphores.
|
||||||
.SS Versions
|
.SS Versions
|
||||||
Prior to kernel 2.6, Linux only supported unnamed,
|
Prior to kernel 2.6, Linux only supported unnamed,
|
||||||
thread-shared semaphores.
|
thread-shared semaphores.
|
||||||
|
|
Loading…
Reference in New Issue