.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
-.TH SEM_OVERVIEW 7 2012-05-13 "Linux" "Linux Programmer's Manual"
+.TH SEM_OVERVIEW 7 2017-05-03 "Linux" "Linux Programmer's Manual"
.SH NAME
sem_overview \- overview of POSIX semaphores
.SH DESCRIPTION
POSIX semaphores allow processes and threads to synchronize their actions.
-
+.PP
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
If the value of a semaphore is currently zero, then a
.BR sem_wait (3)
operation will block until the value becomes greater than zero.
-
+.PP
POSIX semaphores come in two forms: named semaphores and
unnamed semaphores.
.TP
Two processes can operate on the same named semaphore by passing
the same name to
.BR sem_open (3).
-
+.IP
The
.BR sem_open (3)
function creates a new named semaphore or opens an existing
.BR shmget (2),
or a POSIX shared memory object built created using
.BR shm_open (3)).
-
+.IP
Before being used, an unnamed semaphore must be initialized using
.BR sem_init (3).
It can then be operated on using
rather than
.B NAME_MAX
characters.)
-
+.PP
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.
.SH NOTES
.BR sem_post (3),
.BR sem_unlink (3),
.BR sem_wait (3),
-.BR pthreads (7)
+.BR pthreads (7),
+.BR shm_overview (7)