summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/sem_init.3
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-01-09 05:40:46 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-01-09 05:40:46 +0000
commitc74318c2e33ba84d1619a726e45a26870b350fcf (patch)
tree43be79b29111a15ebb9b331696eee51e50a79626 /lib/libc/gen/sem_init.3
parent5a44a5f7ae6307991bebaf2dd7613ae2c0320705 (diff)
downloadFreeBSD-src-c74318c2e33ba84d1619a726e45a26870b350fcf.zip
FreeBSD-src-c74318c2e33ba84d1619a726e45a26870b350fcf.tar.gz
Update manual for sem_init and sem_open, restrictions of shared semaphore
and 14 characters in name length no longer exist. Reviewed by: deischen@
Diffstat (limited to 'lib/libc/gen/sem_init.3')
-rw-r--r--lib/libc/gen/sem_init.312
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libc/gen/sem_init.3 b/lib/libc/gen/sem_init.3
index 5938f2c..e00cd4b 100644
--- a/lib/libc/gen/sem_init.3
+++ b/lib/libc/gen/sem_init.3
@@ -46,9 +46,19 @@ function initializes the unnamed semaphore pointed to by
.Fa sem
to have the value
.Fa value .
+.Pp
A non-zero value for
.Fa pshared
-specifies a shared semaphore that can be used by multiple processes.
+specifies a shared semaphore that can be used by multiple processes,
+the semaphore should be located in shared memory region (see
+.Xr mmap 2 ,
+.Xr shm_open 2 ,
+and
+.Xr shmget 2 ) ,
+any process having read and write access to address
+.Fa sem
+can perform semaphore operations on
+.Fa sem .
.Pp
Following a successful call to
.Fn sem_init ,
OpenPOWER on IntegriCloud