Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread p1003.1b semaphore manual pages have been mov...
details: https://anonhg.NetBSD.org/src/rev/d8369e63dce7
branches: trunk
changeset: 542234:d8369e63dce7
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Jan 24 01:53:27 2003 +0000
description:
p1003.1b semaphore manual pages have been moved to librt.
diffstat:
lib/libpthread/Makefile | 13 +-----
lib/libpthread/sem_destroy.3 | 83 ----------------------------------
lib/libpthread/sem_getvalue.3 | 76 -------------------------------
lib/libpthread/sem_init.3 | 100 ------------------------------------------
lib/libpthread/sem_open.3 | 83 ----------------------------------
lib/libpthread/sem_post.3 | 72 ------------------------------
lib/libpthread/sem_wait.3 | 88 ------------------------------------
7 files changed, 1 insertions(+), 514 deletions(-)
diffs (truncated from 553 to 300 lines):
diff -r 2a0fea0adfcc -r d8369e63dce7 lib/libpthread/Makefile
--- a/lib/libpthread/Makefile Fri Jan 24 01:52:42 2003 +0000
+++ b/lib/libpthread/Makefile Fri Jan 24 01:53:27 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2003/01/21 02:24:41 christos Exp $
+# $NetBSD: Makefile,v 1.13 2003/01/24 01:53:27 thorpej Exp $
#
WARNS= 2
@@ -65,17 +65,6 @@
debuglog: debuglog.o
$(CC) -o debuglog debuglog.o -lpthread
-MAN+= sem_destroy.3
-MAN+= sem_getvalue.3
-MAN+= sem_init.3
-MAN+= sem_open.3
-MAN+= sem_post.3
-MAN+= sem_wait.3
-
-MLINKS+= sem_open.3 sem_close.3
-MLINKS+= sem_open.3 sem_unlink.3
-MLINKS+= sem_wait.3 sem_trywait.3
-
.include <bsd.lib.mk>
.else
diff -r 2a0fea0adfcc -r d8369e63dce7 lib/libpthread/sem_destroy.3
--- a/lib/libpthread/sem_destroy.3 Fri Jan 24 01:52:42 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-.\" $NetBSD: sem_destroy.3,v 1.2 2003/01/21 11:47:32 wiz Exp $
-.\"
-.\" Copyright (C) 2000 Jason Evans <jasone%FreeBSD.org@localhost>.
-.\" All rights reserved.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.\" $FreeBSD: src/lib/libpthread/man/sem_destroy.3,v 1.11 2002/12/27 12:15:31 schweikh Exp $
-.Dd February 15, 2000
-.Dt SEM_DESTROY 3
-.Os
-.Sh NAME
-.Nm sem_destroy
-.Nd destroy an unnamed semaphore
-.Sh LIBRARY
-.Lb libpthread
-.Sh SYNOPSIS
-.In semaphore.h
-.Ft int
-.Fn sem_destroy "sem_t *sem"
-.Sh DESCRIPTION
-The
-.Fn sem_destroy
-function destroys the unnamed semaphore pointed to by
-.Fa sem .
-After a successful call to
-.Fn sem_destroy ,
-.Fa sem
-is unusable until re-initialized by another call to
-.Fn sem_init .
-.Sh RETURN VALUES
-.Rv -std sem_destroy
-.Sh ERRORS
-.Fn sem_destroy
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa sem
-points to an invalid semaphore.
-.It Bq Er EBUSY
-There are currently threads blocked on the semaphore that
-.Fa sem
-points to.
-.El
-.Sh SEE ALSO
-.Xr sem_init 3
-.Sh STANDARDS
-.Fn sem_destroy
-conforms to
-.St -p1003.1-96 .
-.Pp
-POSIX does not define the behavior of
-.Fn sem_destroy
-if called while there are threads blocked on
-.Fa sem ,
-but this implementation is guaranteed to return \-1 and set
-.Va errno
-to
-.Er EBUSY
-if there are threads blocked on
-.Fa sem .
diff -r 2a0fea0adfcc -r d8369e63dce7 lib/libpthread/sem_getvalue.3
--- a/lib/libpthread/sem_getvalue.3 Fri Jan 24 01:52:42 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-.\" $NetBSD: sem_getvalue.3,v 1.2 2003/01/21 11:48:03 wiz Exp $
-.\"
-.\" Copyright (C) 2000 Jason Evans <jasone%FreeBSD.org@localhost>.
-.\" All rights reserved.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.\" $FreeBSD: src/lib/libpthread/man/sem_getvalue.3,v 1.10 2002/09/16 19:29:29 mini Exp $
-.Dd February 15, 2000
-.Dt SEM_GETVALUE 3
-.Os
-.Sh NAME
-.Nm sem_getvalue
-.Nd get the value of a semaphore
-.Sh LIBRARY
-.Lb libpthread
-.Sh SYNOPSIS
-.In semaphore.h
-.Ft int
-.Fn sem_getvalue "sem_t *sem" "int *sval"
-.Sh DESCRIPTION
-The
-.Fn sem_getvalue
-function sets the variable pointed to by
-.Fa sval
-to the current value of the semaphore pointed to by
-.Fa sem ,
-as of the time that the call to
-.Fn sem_getvalue
-is actually run.
-.Sh RETURN VALUES
-.Rv -std sem_getvalue
-.Sh ERRORS
-.Fn sem_getvalue
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa sem
-points to an invalid semaphore.
-.El
-.Sh SEE ALSO
-.Xr sem_post 3 ,
-.Xr sem_trywait 3 ,
-.Xr sem_wait 3
-.Sh STANDARDS
-.Fn sem_getvalue
-conforms to
-.St -p1003.1-96 .
-.Pp
-The value of the semaphore is never negative, even if there are threads blocked
-on the semaphore.
-POSIX is somewhat ambiguous in its wording with regard to
-what the value of the semaphore should be if there are blocked waiting threads,
-but this behavior is conformant, given the wording of the specification.
diff -r 2a0fea0adfcc -r d8369e63dce7 lib/libpthread/sem_init.3
--- a/lib/libpthread/sem_init.3 Fri Jan 24 01:52:42 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-.\" $NetBSD: sem_init.3,v 1.1 2003/01/21 02:24:41 christos Exp $
-.\"
-.\" Copyright (C) 2000 Jason Evans <jasone%FreeBSD.org@localhost>.
-.\" All rights reserved.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.\" $FreeBSD: src/lib/libpthread/man/sem_init.3,v 1.12 2002/09/16 19:29:29 mini Exp $
-.Dd February 15, 2000
-.Dt SEM_INIT 3
-.Os
-.Sh NAME
-.Nm sem_init
-.Nd initialize an unnamed semaphore
-.Sh LIBRARY
-.Lb libpthread
-.Sh SYNOPSIS
-.In semaphore.h
-.Ft int
-.Fn sem_init "sem_t *sem" "int pshared" "unsigned int value"
-.Sh DESCRIPTION
-The
-.Fn sem_init
-function initializes the unnamed semaphore pointed to by
-.Fa sem
-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.
-.Pp
-Following a successful call to
-.Fn sem_init ,
-.Fa sem
-can be used as an argument in subsequent calls to
-.Fa sem_wait ,
-.Fa sem_trywait ,
-.Fa sem_post ,
-and
-.Fa sem_destroy .
-.Fa sem
-is no longer valid after a successful call to
-.Fa sem_destroy .
-.Sh RETURN VALUES
-.Rv -std sem_init
-.Sh ERRORS
-.Fn sem_init
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa value
-exceeds SEM_VALUE_MAX.
-.It Bq Er ENOSPC
-Memory allocation error.
-.It Bq Er EPERM
-Unable to initialize a shared semaphore.
-.El
-.Sh SEE ALSO
-.Xr sem_destroy 3 ,
-.Xr sem_post 3 ,
-.Xr sem_trywait 3 ,
-.Xr sem_wait 3
-.Sh STANDARDS
-.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 -r 2a0fea0adfcc -r d8369e63dce7 lib/libpthread/sem_open.3
--- a/lib/libpthread/sem_open.3 Fri Jan 24 01:52:42 2003 +0000
Home |
Main Index |
Thread Index |
Old Index