summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-01-14 04:12:33 +0000
committertjr <tjr@FreeBSD.org>2003-01-14 04:12:33 +0000
commit8f97c15f80b1b5c708048e55765ff56df527eb82 (patch)
tree216156ed9a183485c4af2cab3dc0977e0852a30c
parent8b7eb47681f9799f1b2fb15e2ac753c2951050d1 (diff)
downloadFreeBSD-src-8f97c15f80b1b5c708048e55765ff56df527eb82.zip
FreeBSD-src-8f97c15f80b1b5c708048e55765ff56df527eb82.tar.gz
Sharing semaphores between processes works now, so remove the stale comments
about it always returning EPERM. Document that ENFILE occurs when the limit on kernel semaphores is reached.
-rw-r--r--lib/libc/gen/sem_init.324
-rw-r--r--lib/libc_r/man/sem_init.324
2 files changed, 16 insertions, 32 deletions
diff --git a/lib/libc/gen/sem_init.3 b/lib/libc/gen/sem_init.3
index f9eec78..a6bba4a 100644
--- a/lib/libc/gen/sem_init.3
+++ b/lib/libc/gen/sem_init.3
@@ -26,7 +26,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
-.Dd February 15, 2000
+.Dd January 14, 2003
.Dt SEM_INIT 3
.Os
.Sh NAME
@@ -47,8 +47,9 @@ to have the value
.Fa value .
A non-zero value for
.Fa pshared
-specifies a shared semaphore that can be used by multiple processes, which this
-implementation is not capable of.
+specifies a shared semaphore that can be used by any process
+that can access
+.Fa sem .
.Pp
Following a successful call to
.Fn sem_init ,
@@ -73,8 +74,10 @@ will fail if:
exceeds SEM_VALUE_MAX.
.It Bq Er ENOSPC
Memory allocation error.
-.It Bq Er EPERM
-Unable to initialize a shared semaphore.
+.It Bq Er ENFILE
+The system limit on semaphores
+.Pq Dv SEM_NSEMS_MAX
+has been reached.
.El
.Sh SEE ALSO
.Xr sem_destroy 3 ,
@@ -86,14 +89,3 @@ Unable to initialize a shared semaphore.
.Fn sem_init
conforms to
.St -p1003.1-96 .
-.Pp
-This implementation does not support shared semaphores, and reports this fact
-by setting
-.Va errno
-to
-.Er EPERM .
-This is perhaps a stretch of the intention of POSIX, but is
-compliant, with the caveat that
-.Fn sem_init
-always reports a permissions error when an attempt to create a shared semaphore
-is made.
diff --git a/lib/libc_r/man/sem_init.3 b/lib/libc_r/man/sem_init.3
index f9eec78..a6bba4a 100644
--- a/lib/libc_r/man/sem_init.3
+++ b/lib/libc_r/man/sem_init.3
@@ -26,7 +26,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
-.Dd February 15, 2000
+.Dd January 14, 2003
.Dt SEM_INIT 3
.Os
.Sh NAME
@@ -47,8 +47,9 @@ to have the value
.Fa value .
A non-zero value for
.Fa pshared
-specifies a shared semaphore that can be used by multiple processes, which this
-implementation is not capable of.
+specifies a shared semaphore that can be used by any process
+that can access
+.Fa sem .
.Pp
Following a successful call to
.Fn sem_init ,
@@ -73,8 +74,10 @@ will fail if:
exceeds SEM_VALUE_MAX.
.It Bq Er ENOSPC
Memory allocation error.
-.It Bq Er EPERM
-Unable to initialize a shared semaphore.
+.It Bq Er ENFILE
+The system limit on semaphores
+.Pq Dv SEM_NSEMS_MAX
+has been reached.
.El
.Sh SEE ALSO
.Xr sem_destroy 3 ,
@@ -86,14 +89,3 @@ Unable to initialize a shared semaphore.
.Fn sem_init
conforms to
.St -p1003.1-96 .
-.Pp
-This implementation does not support shared semaphores, and reports this fact
-by setting
-.Va errno
-to
-.Er EPERM .
-This is perhaps a stretch of the intention of POSIX, but is
-compliant, with the caveat that
-.Fn sem_init
-always reports a permissions error when an attempt to create a shared semaphore
-is made.
OpenPOWER on IntegriCloud