diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2013-11-19 02:01:29 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2013-11-19 02:01:29 +0000 |
commit | 670272e4ab8dadda7bea75b7890969518d636b76 (patch) | |
tree | e970eb0d8e2f036ec8c20fccf9bd34927956c366 | |
parent | 6320cead2a817dbc0280f68942313ac542dc66cc (diff) |
slightly better
-rw-r--r-- | lib/libpthread/man/sem_open.3 | 56 |
1 files changed, 25 insertions, 31 deletions
diff --git a/lib/libpthread/man/sem_open.3 b/lib/libpthread/man/sem_open.3 index 075f0aae121..650c3cf1c2a 100644 --- a/lib/libpthread/man/sem_open.3 +++ b/lib/libpthread/man/sem_open.3 @@ -1,41 +1,27 @@ -.\" $OpenBSD: sem_open.3,v 1.6 2013/11/18 23:17:52 tedu Exp $ +.\" $OpenBSD: sem_open.3,v 1.7 2013/11/19 02:01:28 tedu Exp $ .\" -.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>. -.\" All rights reserved. +.\" Copyright (c) 2013 Ted Unangst <tedu@openbsd.org> .\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice(s), this list of conditions and the following disclaimer as -.\" the first lines of this file unmodified other than the possible -.\" addition of one or more copyright notices. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice(s), this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY -.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE -.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD: src/lib/libc_r/man/sem_open.3,v 1.7 2001/10/01 16:09:09 ru Exp $ -.Dd $Mdocdate: November 18 2013 $ +.Dd $Mdocdate: November 19 2013 $ .Dt SEM_OPEN 3 .Os .Sh NAME .Nm sem_open , .Nm sem_close , .Nm sem_unlink -.Nd named semaphore operations +.Nd open and close named semaphores .Sh SYNOPSIS .In semaphore.h .Ft sem_t * @@ -54,6 +40,13 @@ The .Fn sem_unlink function removes the named semaphore from the system without closing it. .Sh RETURN VALUES +On success, +.Fn sem_open +returns a pointer to a semaphore. +.Fn sem_close +and +.Fn sem_unlink +return 0 on success. .Fn sem_open returns SEM_FAILED and sets .Va errno @@ -71,10 +64,10 @@ and .Fn sem_unlink may fail: .Bl -tag -width Er +.It Bq Er ENOSPC +Inusfficient memory is available. .It Bq Er EPERM An attempt was made to open a shared semaphore owned by another user. -.It Bq Er ENOSYS -Function not supported by this implementation. .El .Sh SEE ALSO .Xr sem_destroy 3 , @@ -87,5 +80,6 @@ Function not supported by this implementation. .Fn sem_close , and .Fn sem_unlink -conform to +appear in .St -p1003.1-96 . +This implementation deviates from the standard by permitting less sharing. |