diff options
| author | David Xu <davidxu@FreeBSD.org> | 2010-01-09 05:40:46 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2010-01-09 05:40:46 +0000 |
| commit | a455039e3a2e6a9209a0dd1313e4a7e9c25fdb2c (patch) | |
| tree | 43be79b29111a15ebb9b331696eee51e50a79626 /lib/libc | |
| parent | 2bd661baa1f2ba16274c7652e2b04841f42297ea (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/gen/sem_init.3 | 12 | ||||
| -rw-r--r-- | lib/libc/gen/sem_open.3 | 14 |
2 files changed, 17 insertions, 9 deletions
diff --git a/lib/libc/gen/sem_init.3 b/lib/libc/gen/sem_init.3 index 5938f2ce28c7..e00cd4bcd2c4 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 , diff --git a/lib/libc/gen/sem_open.3 b/lib/libc/gen/sem_open.3 index 772bdfb70dac..c7ee51885b28 100644 --- a/lib/libc/gen/sem_open.3 +++ b/lib/libc/gen/sem_open.3 @@ -58,6 +58,12 @@ The returned semaphore may be used in subsequent calls to and .Fn sem_close . .Pp +This implementation places strict requirements on the value of +.Fa name : +it must begin with a slash +.Pq Ql / , +contain no other slash characters. +.Pp The following bits may be set in the .Fa oflag argument: @@ -217,11 +223,3 @@ functions conform to .Sh HISTORY Support for named semaphores first appeared in .Fx 5.0 . -.Sh BUGS -This implementation places strict requirements on the value of -.Fa name : -it must begin with a slash -.Pq Ql / , -contain no other slash characters, -and be less than 14 characters in length -not including the terminating null character. |
