diff options
Diffstat (limited to 'lib/libpthread/man')
34 files changed, 0 insertions, 2736 deletions
diff --git a/lib/libpthread/man/Makefile.inc b/lib/libpthread/man/Makefile.inc deleted file mode 100644 index f92f3df5230e..000000000000 --- a/lib/libpthread/man/Makefile.inc +++ /dev/null @@ -1,39 +0,0 @@ -# $Id: Makefile.inc,v 1.4 1998/07/31 09:09:19 phk Exp $ - -# POSIX thread man files - -.PATH: ${.CURDIR}/man - -MAN3+= pthread_cleanup_pop.3 \ - pthread_cleanup_push.3 \ - pthread_cond_broadcast.3 \ - pthread_cond_destroy.3 \ - pthread_cond_init.3 \ - pthread_cond_signal.3 \ - pthread_cond_timedwait.3 \ - pthread_cond_wait.3 \ - pthread_create.3 \ - pthread_detach.3 \ - pthread_equal.3 \ - pthread_exit.3 \ - pthread_getspecific.3 \ - pthread_join.3 \ - pthread_key_create.3 \ - pthread_key_delete.3 \ - pthread_mutex_destroy.3 \ - pthread_mutex_init.3 \ - pthread_mutex_lock.3 \ - pthread_mutex_trylock.3 \ - pthread_mutex_unlock.3 \ - pthread_once.3 \ - pthread_rwlock_destroy.3 \ - pthread_rwlock_init.3 \ - pthread_rwlock_rdlock.3 \ - pthread_rwlock_unlock.3 \ - pthread_rwlock_wrlock.3 \ - pthread_rwlockattr_destroy.3 \ - pthread_rwlockattr_getpshared.3 \ - pthread_rwlockattr_init.3 \ - pthread_rwlockattr_setpshared.3 \ - pthread_self.3 \ - pthread_setspecific.3 diff --git a/lib/libpthread/man/pthread_cleanup_pop.3 b/lib/libpthread/man/pthread_cleanup_pop.3 deleted file mode 100644 index eefe4f335ae7..000000000000 --- a/lib/libpthread/man/pthread_cleanup_pop.3 +++ /dev/null @@ -1,60 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 30, 1998 -.Dt PTHREAD_CLEANUP_POP 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_cleanup_pop -.Nd call the first cleanup routine -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft void -.Fn pthread_cleanup_pop "int execute" -.Sh DESCRIPTION -The -.Fn pthread_cleanup_pop -function pops the top cleanup routine off of the current threads cleanup -routine stack, and, if -.Fa execute -is non-zero, it will execute the function. If there is no cleanup routine -then -.Fn pthread_cleanup_pop -does nothing. -.Sh RETURN VALUES -.Fn pthread_cleanup_pop -does not return any value. -.Sh ERRORS -None -.Sh SEE ALSO -.Xr pthread_cleanup_push 3 , -.Xr pthread_exit 3 -.Sh STANDARDS -.Fn pthread_cleanup_pop -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_cleanup_push.3 b/lib/libpthread/man/pthread_cleanup_push.3 deleted file mode 100644 index 9bb3f400b646..000000000000 --- a/lib/libpthread/man/pthread_cleanup_push.3 +++ /dev/null @@ -1,63 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 30, 1998 -.Dt PTHREAD_CLEANUP_PUSH 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_cleanup_push -.Nd add a cleanup function for thread exit -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft void -.Fn pthread_cleanup_push "void (*cleanup_routine)(void *)" "void *arg" -.Sh DESCRIPTION -The -.Fn pthread_cleanup_push -function adds -.Fa cleanup_routine -to the top of the stack of cleanup handlers that -get called when the current thread exits. -.Pp -When -.Fn pthread_cleanup_push -is called, it is passed -.Fa arg -as its only argument. -.Sh RETURN VALUES -.Fn pthread_cleanup_push -does not return any value. -.Sh ERRORS -None -.Sh SEE ALSO -.Xr pthread_cleanup_pop 3 , -.Xr pthread_exit 3 -.Sh STANDARDS -.Fn pthread_cleanup_push -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_cond_broadcast.3 b/lib/libpthread/man/pthread_cond_broadcast.3 deleted file mode 100644 index 3b39287046db..000000000000 --- a/lib/libpthread/man/pthread_cond_broadcast.3 +++ /dev/null @@ -1,68 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 28, 1998 -.Dt PTHREAD_COND_BROADCAST 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_cond_broadcast -.Nd unblock all threads waiting for a condition variable -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_cond_broadcast "pthread_cond_t *cond" -.Sh DESCRIPTION -The -.Fn pthread_cond_broadcast -function unblocks all threads waiting for the condition variable -.Fa cond . -.Sh RETURN VALUES -If successful, the -.Fn pthread_cond_broadcast -function will return zero, otherwise an error number will be returned -to indicate the error. -.Sh ERRORS -.Fn pthread_cond_broadcast -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa cond -is invalid. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_cond_destroy 3 , -.Xr pthread_cond_init 3 , -.Xr pthread_cond_signal 3 , -.Xr pthread_cond_timedwait 3 , -.Xr pthread_cond_wait 3 -.Sh STANDARDS -.Fn pthread_cond_broadcast -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_cond_destroy.3 b/lib/libpthread/man/pthread_cond_destroy.3 deleted file mode 100644 index 22921b49a5ed..000000000000 --- a/lib/libpthread/man/pthread_cond_destroy.3 +++ /dev/null @@ -1,72 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 28, 1998 -.Dt PTHREAD_COND_DESTROY 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_cond_destroy -.Nd destroy a condition variable -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_cond_destroy "pthread_cond_t *cond" -.Sh DESCRIPTION -The -.Fn pthread_cond_destroy -function frees the resources allocated by the condition variable -.Fa cond . -.Sh RETURN VALUES -If successful, the -.Fn pthread_cond_init -function will return zero, otherwise an error number will be returned -to indicate the error. -.Sh ERRORS -.Fn pthread_cond_destroy -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa cond -is invalid. -.It Bq Er EBUSY -The variable -.Fa cond -is locked by another thread. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_cond_broadcast 3 , -.Xr pthread_cond_init 3 , -.Xr pthread_cond_signal 3 , -.Xr pthread_cond_timedwait 3 , -.Xr pthread_cond_wait 3 -.Sh STANDARDS -.Fn pthread_cond_destroy -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_cond_init.3 b/lib/libpthread/man/pthread_cond_init.3 deleted file mode 100644 index 00f669d51bef..000000000000 --- a/lib/libpthread/man/pthread_cond_init.3 +++ /dev/null @@ -1,77 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 28, 1998 -.Dt PTHREAD_COND_INIT 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_cond_init -.Nd create a condition variable -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_cond_init "pthread_cond_t *cond" "const pthread_condattr_t *attr" -.Sh DESCRIPTION -The -.Fn pthread_cond_init -function creates a new condition variable, with attributes specified with -.Fa attr . -If -.Fa attr -is NULL the default attributes are used. -.Sh RETURN VALUES -If successful, the -.Fn pthread_cond_init -function will return zero and put the new condition variable id into -.Fa cond , -otherwise an error number will be returned to indicate the error. -.Sh ERRORS -.Fn pthread_cond_init -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa attr -is invalid. -.It Bq Er ENOMEM -The process cannot allocate enough memory to create another condition -variable. -.It Bq Er EAGAIN -The temporarily lacks the resources to create another condition variable. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_cond_broadcast 3 , -.Xr pthread_cond_destroy 3 , -.Xr pthread_cond_signal 3 , -.Xr pthread_cond_timedwait 3 , -.Xr pthread_cond_wait 3 -.Sh STANDARDS -.Fn pthread_cond_init -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_cond_signal.3 b/lib/libpthread/man/pthread_cond_signal.3 deleted file mode 100644 index 679e46fb2ed2..000000000000 --- a/lib/libpthread/man/pthread_cond_signal.3 +++ /dev/null @@ -1,68 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 28, 1998 -.Dt PTHREAD_COND_SIGNAL 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_cond_signal -.Nd unblock a thread waiting for a condition variable -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_cond_signal "pthread_cond_t *cond" -.Sh DESCRIPTION -The -.Fn pthread_cond_signal -function unblocks one thread waiting for the condition variable -.Fa cond . -.Sh RETURN VALUES -If successful, the -.Fn pthread_cond_signal -function will return zero, otherwise an error number will be returned -to indicate the error. -.Sh ERRORS -.Fn pthread_cond_signal -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa cond -is invalid. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_cond_broadcast 3 , -.Xr pthread_cond_destroy 3 , -.Xr pthread_cond_init 3 , -.Xr pthread_cond_timedwait 3 , -.Xr pthread_cond_wait 3 -.Sh STANDARDS -.Fn pthread_cond_signal -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_cond_timedwait.3 b/lib/libpthread/man/pthread_cond_timedwait.3 deleted file mode 100644 index ab0184a7c584..000000000000 --- a/lib/libpthread/man/pthread_cond_timedwait.3 +++ /dev/null @@ -1,85 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 28, 1998 -.Dt PTHREAD_COND_TIMEDWAIT 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_cond_timedwait -.Nd wait on a condition variable for a specific amount of time -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_cond_timedwait "pthread_cond_t *cond" "pthread_mutex_t *mutex" "const struct timespec *abstime" -.Sh DESCRIPTION -The -.Fn pthread_cond_timedwait -function atomically blocks the current thread waiting on the condition -variable specified by -.Fa cond , -and unblocks the mutex specified by -.Fa mutex . -The waiting thread unblocks only after another thread calls -.Xr pthread_cond_signal 3 , -or -.Xr pthread_cond_broadcast 3 -with the same condition variable, or if the system time reaches the -time specified in -.Fa abstime , -and the current thread reaquires the lock on -.Fa mutex . -.Sh RETURN VALUES -If successful, the -.Fn pthread_cond_timedwait -function will return zero. Otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_cond_timedwait -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa cond -or the value specified by -.Fa attr -is invalid. -.It Bq Er ETIMEDOUT -The system time has reached or exceeded the time specified in -.Fa abstime . -.El -.Pp -.Sh SEE ALSO -.Xr pthread_cond_broadcast 3 , -.Xr pthread_cond_destroy 3 , -.Xr pthread_cond_init 3 , -.Xr pthread_cond_signal 3 , -.Xr pthread_cond_wait 3 -.Sh STANDARDS -.Fn pthread_cond_timedwait -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_cond_wait.3 b/lib/libpthread/man/pthread_cond_wait.3 deleted file mode 100644 index 7f70b591f037..000000000000 --- a/lib/libpthread/man/pthread_cond_wait.3 +++ /dev/null @@ -1,79 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 28, 1998 -.Dt PTHREAD_COND_WAIT 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_cond_wait -.Nd wait on a condition variable -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_cond_wait "pthread_cond_t *cond" "pthread_mutex_t *mutex" -.Sh DESCRIPTION -The -.Fn pthread_cond_wait -function atomically blocks the current thread waiting on the condition -variable specified by -.Fa cond , -and unblocks the mutex specified by -.Fa mutex . -The waiting thread unblocks only after another thread calls -.Xr pthread_cond_signal 3 , or -.Xr pthread_cond_broadcast 3 -with the same condition variable, and the current thread reaquires the lock -on -.Fa mutex . -.Sh RETURN VALUES -If successful, the -.Fn pthread_cond_wait -function will return zero. Otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_cond_wait -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa cond -or the value specified by -.Fa attr -is invalid. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_cond_broadcast 3 , -.Xr pthread_cond_destroy 3 , -.Xr pthread_cond_init 3 , -.Xr pthread_cond_signal 3 , -.Xr pthread_cond_timedwait 3 -.Sh STANDARDS -.Fn pthread_cond_wait -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_create.3 b/lib/libpthread/man/pthread_create.3 deleted file mode 100644 index 6966b56398aa..000000000000 --- a/lib/libpthread/man/pthread_create.3 +++ /dev/null @@ -1,112 +0,0 @@ -.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_CREATE 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_create -.Nd create a new thread -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_create "pthread_t *thread" "const pthread_attr_t *attr" "void *(*start_routine)(void *)" "void *arg" -.Sh DESCRIPTION -The -.Fn pthread_create -function is used to create a new thread, with attributes specified by -.Fa attr , -within a process. If -.Fa attr -is NULL, the default attributes are used. If the attributes specified by -.Fa attr -are modified later, the thread's attributes are not affected. Upon -successful completion -.Fn pthread_create -will store the ID of the created thread in the location specified by -.Fa thread . -.Pp -The thread is created executing -.Fa start_routine -with -.Fa arg -as its sole argument. If the -.Fa start_routine -returns, the effect is as if there was an implicit call to -.Fn pthread_exit -using the return value of -.Fa start_routine -as the exit status. Note that the thread in which -.Fn main -was originally invoked differs from this. When it returns from -.Fn main , -the effect is as if there was an implicit call to -.Fn exit -using the return value of -.Fn main -as the exit status. -.Pp -The signal state of the new thread is initialized as: -.Bl -bullet -offset indent -.It -The signal mask is inherited from the creating thread. -.It -The set of signals pending for the new thread is empty. -.El -.Sh RETURN VALUES -If successful, the -.Fn pthread_create -function will return zero. Otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_create -will fail if: -.Bl -tag -width Er -.It Bq Er EAGAIN -The system lacked the necessary resources to create another thread, or -the system-imposed limit on the total number of threads in a process -[PTHREAD_THREADS_MAX] would be exceeded. -.It Bq Er EINVAL -The value specified by -.Fa attr -is invalid. -.El -.Pp -.Sh SEE ALSO -.Xr fork 2 , -.Xr pthread_cleanup_pop 3 , -.Xr pthread_cleanup_push 3 , -.Xr pthread_exit 3 , -.Xr pthread_join 3 -.Sh STANDARDS -.Fn pthread_create -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_detach.3 b/lib/libpthread/man/pthread_detach.3 deleted file mode 100644 index a7f0490ae0d3..000000000000 --- a/lib/libpthread/man/pthread_detach.3 +++ /dev/null @@ -1,81 +0,0 @@ -.\" Copyright (c) 1996-1998 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_DETACH 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_detach -.Nd detach a thread -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_detach "pthread_t thread" -.Sh DESCRIPTION -The -.Fn pthread_detach -function is used to indicate to the implementation that storage for the -thread -.Fa thread -can be reclaimed when the thread terminates. If -.Fa thread -has not terminated, -.Fn pthread_detach -will not cause it to terminate. The effect of multiple -.Fn pthread_detach -calls on the same target thread is unspecified. -.Sh RETURN VALUES -If successful, the -.Fn pthread_detach -function will return zero. Otherwise an error number will be returned to -indicate the error. Note that the function does not change the value -of errno as it did for some drafts of the standard. These early drafts -also passed a pointer to pthread_t as the argument. Beware! -.Sh ERRORS -.Fn pthread_detach -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The implementation has detected that the value specified by -.Fa thread -does not refer to a joinable thread. -.It Bq Er ESRCH -No thread could be found corresponding to that specified by the given -thread ID, -.Fa thread . -.El -.Pp -.Sh SEE ALSO -.Xr pthread_join 3 -.Sh STANDARDS -.Fn pthread_detach -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_equal.3 b/lib/libpthread/man/pthread_equal.3 deleted file mode 100644 index 74a588279b9d..000000000000 --- a/lib/libpthread/man/pthread_equal.3 +++ /dev/null @@ -1,66 +0,0 @@ -.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_EQUAL 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_equal -.Nd compare thread IDs -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_equal "pthread_t t1" "pthread_t t2" -.Sh DESCRIPTION -The -.Fn pthread_equal -function compares the thread IDs -.Fa t1 -and -.Fa t2 . -.Sh RETURN VALUES -The -.Fn pthread_equal -function will non-zero if the thread IDs -.Fa t1 -and -.Fa t2 -correspond to the same thread, otherwise it will return zero. -.Sh ERRORS -None. -.Pp -.Sh SEE ALSO -.Xr pthread_create 3 , -.Xr pthread_exit 3 -.Sh STANDARDS -.Fn pthread_equal -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_exit.3 b/lib/libpthread/man/pthread_exit.3 deleted file mode 100644 index 0e0f1765ee85..000000000000 --- a/lib/libpthread/man/pthread_exit.3 +++ /dev/null @@ -1,99 +0,0 @@ -.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_EXIT 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_exit -.Nd terminate the calling thread -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft void -.Fn pthread_exit "void *value_ptr" -.Sh DESCRIPTION -The -.Fn pthread_exit -function terminates the calling thread and makes the value -.Fa value_ptr -available to any successful join with the terminating thread. Any -cancellation cleanup handlers that have been pushed and are not yet popped -are popped in the reverse order that they were pushed and then executed. -After all cancellation handlers have been executed, if the thread has any -thread-specific data, appropriate destructor functions are called in an -unspecified order. Thread termination does not release any application -visible process resources, including, but not limited to, mutexes and -file descriptors, nor does it perform any process level cleanup -actions, including, but not limited to, calling -.Fn atexit -routines that may exist. -.Pp -An implicit call to -.Fn pthread_exit -is made when a thread other than the thread in which -.Fn main -was first invoked returns from the start routine that was used to create -it. The function's return value serves as the thread's exit status. -.Pp -The behavior of -.Fn pthread_exit -is undefied if called from a cancellation handler or destructor function -that was invoked as the result of an implicit or explicit call to -.Fn pthread_exit . -.Pp -After a thread has terminated, the result of access to local (auto) -variables of the thread is undefined. Thus, references to local variables -of the exiting thread should not be used for the -.Fn pthread_exit -.Fa value_ptr -parameter value. -.Pp -The process will exit with an exit status of 0 after the last thread has -been terminated. The behavior is as if the implementation called -.Fn exit -with a zero argument at thread termination time. -.Pp -.Sh RETURN VALUES -The -.Fn pthread_exit -function cannot return to its caller. -.Sh ERRORS -None. -.Pp -.Sh SEE ALSO -.Xr _exit 2 , -.Xr exit 2 , -.Xr pthread_create 3 , -.Xr pthread_join 3 -.Sh STANDARDS -.Fn pthread_exit -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_getspecific.3 b/lib/libpthread/man/pthread_getspecific.3 deleted file mode 100644 index b7875fbdb846..000000000000 --- a/lib/libpthread/man/pthread_getspecific.3 +++ /dev/null @@ -1,82 +0,0 @@ -.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.\" $Id: pthread_getspecific.3,v 1.4 1997/02/22 15:05:24 peter Exp $ -.\" -.Dd April 4, 1996 -.Dt PTHREAD_GETSPECIFIC 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_getspecific -.Nd get a thread-specific data value -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft void * -.Fn pthread_getspecific "pthread_key_t key" -.Sh DESCRIPTION -The -.Fn pthread_getspecific -function returns the value currently bound to the specified -.Fa key -on behalf of the calling thread. -.Pp -The effect of calling -.Fn pthread_getspecific -with a -.Fa key -value not obtained from -.Fn pthread_key_create -or after -.Fa key -has been deleted with -.Fn pthread_key_delete -is undefined. -.Pp -.Fn pthread_getspecific -may be called from a thread-specific data destructor function. -.Sh RETURN VALUES -The -.Fn pthread_getspecific -function will return the thread-specific data value associated with the given -.Fa key . -If no thread-specific data value is associated with -.Fa key , -then the value NULL is returned. -.Sh ERRORS -None. -.Sh SEE ALSO -.Xr pthread_key_create 3 , -.Xr pthread_key_delete 3 , -.Xr pthread_setspecific 3 -.Sh STANDARDS -.Fn pthread_getspecific -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_join.3 b/lib/libpthread/man/pthread_join.3 deleted file mode 100644 index d7a28a130535..000000000000 --- a/lib/libpthread/man/pthread_join.3 +++ /dev/null @@ -1,100 +0,0 @@ -.\" Copyright (c) 1996-1998 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_JOIN 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_join -.Nd wait for thread termination -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_join "pthread_t thread" "void **value_ptr" -.Sh DESCRIPTION -The -.Fn pthread_join -function suspends execution of the calling thread until the target -.Fa thread -terminates unless the target -.Fa thread -has already terminated. -.Pp -On return from a successful -.Fn pthread_join -call with a non-NULL -.Fa value_ptr -argument, the value passed to -.Fn pthread_exit -by the terminating thread is stored in the location referenced by -.Fa value_ptr . -When a -.Fn pthread_join -returns successfully, the target thread has been terminated. The results -of multiple simultaneous calls to -.Fn pthread_join -specifying the same target thread are undefined. If the thread calling -.Fn pthread_join -is cancelled, then the target thread is not detached. -.Pp -A thread that has exited but remains unjoined counts against -[_POSIX_THREAD_THREADS_MAX]. -.Pp -.Sh RETURN VALUES -If successful, the -.Fn pthread_join -function will return zero. Otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_join -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The implementation has detected that the value specified by -.Fa thread -does not refer to a joinable thread. -.It Bq Er ESRCH -No thread could be found corresponding to that specified by the given -thread ID, -.Fa thread . -.It Bq Er EDEADLK -A deadlock was detected or the value of -.Fa thread -specifies the calling thread. -.El -.Pp -.Sh SEE ALSO -.Xr wait 2 , -.Xr pthread_create 3 -.Sh STANDARDS -.Fn pthread_join -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_key_create.3 b/lib/libpthread/man/pthread_key_create.3 deleted file mode 100644 index c7c15fd0cef7..000000000000 --- a/lib/libpthread/man/pthread_key_create.3 +++ /dev/null @@ -1,98 +0,0 @@ -.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_KEY_CREATE 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_key_create -.Nd thread-specific data key creation -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_key_create "pthread_key_t *key" "void (*destructor)(void *)" -.Sh DESCRIPTION -The -.Fn pthread_key_create -function creates a thread-specific data key visible to all threads in the -process. Key values provided by -.Fn pthread_key_create -are opaque objects used to locate thread-specific data. Although the same -key value may be used by different threads, the values bound to the key -by -.Fn pthread_setspecific -are maintained on a per-thread basis and persist for the life of the calling -thread. -.Pp -Upon key creation, the value NULL is associated with the new key in all -active threads. Upon thread creation, the value NULL is associated with all -defined keys in the new thread. -.Pp -An optional destructor function may be associated with each key value. At -thread exit, if a key value has a non-NULL destructor pointer, and the -thread has a non-NULL value associated with the key, the function pointed -to is called with the current associated value as its sole argument. The -order of destructor calls is unspecified if more than one destructor exists -for a thread when it exits. -.Pp -If, after all the destructors have been called for all non-NULL values -with associated destructors, there are still some non-NULL values with -associated destructors, then the process is repeated. If, after at least -[PTHREAD_DESTRUCTOR_ITERATIONS] iterations of destructor calls for -outstanding non-NULL values, there are still some non-NULL values with -associated destructors, the implementation stops calling destructors. -.Sh RETURN VALUES -If successful, the -.Fn pthread_key_create -function will store the newly created key value at the location specified by -.Fa key -and returns zero. Otherwise an error number will be returned to indicate -the error. -.Sh ERRORS -.Fn pthread_key_create -will fail if: -.Bl -tag -width Er -.It Bq Er EAGAIN -The system lacked the necessary resources to create another thread-specific -data key, or the system-imposed limit on the total number of keys per process -[PTHREAD_KEYS_MAX] would be exceeded. -.It Bq Er ENOMEM -Insufficient memory exists to create the key. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_getspecific 3 , -.Xr pthread_key_delete 3 , -.Xr pthread_setspecific 3 -.Sh STANDARDS -.Fn pthread_key_create -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_key_delete.3 b/lib/libpthread/man/pthread_key_delete.3 deleted file mode 100644 index cf1ad12ae999..000000000000 --- a/lib/libpthread/man/pthread_key_delete.3 +++ /dev/null @@ -1,92 +0,0 @@ -.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_KEY_DELETE 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_key_delete -.Nd delete a thread-specific data key -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_key_delete "pthread_key_t key" -.Sh DESCRIPTION -The -.Fn pthread_key_delete -function deletes a thread-specific data key previously returned by -.Fn pthread_key_create . -The thread-specific data values associated with -.Fa key -need not be NULL at the time that -.Fn pthread_key_delete -is called. It is the responsibility of the application to free any -application storage or perform any cleanup actions for data structures -related to the deleted key or associated thread-specific data in any threads; -this cleanup can be done either before or after -.Fn pthread_key_delete -is called. Any attempt to use -.Fa key -following the call to -.Fn pthread_key_delete -results in undefined behavior. -.Pp -The -.Fn pthread_key_delete -function is callable from within destructor functions. Destructor functions -are not invoked by -.Fn pthread_key_delete . -Any destructor function that may have been associated with -.Fa key -will no longer be called upon thread exit. -.Sh RETURN VALUES -If successful, the -.Fn pthread_key_delete -function will return zero. Otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_key_delete -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The -.Fa key -value is invalid. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_getspecific 3 , -.Xr pthread_key_create 3 , -.Xr pthread_setspecific 3 -.Sh STANDARDS -.Fn pthread_key_delete -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_mutex_destroy.3 b/lib/libpthread/man/pthread_mutex_destroy.3 deleted file mode 100644 index e9fb9c11d045..000000000000 --- a/lib/libpthread/man/pthread_mutex_destroy.3 +++ /dev/null @@ -1,70 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 29, 1998 -.Dt PTHREAD_MUTEX_DESTROY 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_mutex_destroy -.Nd free resources allocated for a mutex -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_mutex_destroy "pthread_mutex_t *mutex" -.Sh DESCRIPTION -The -.Fn pthread_mutex_destroy -function frees the resources allocated for -.Fa mutex . -.Sh RETURN VALUES -If successful, -.Fn pthread_mutex_destroy -will return zero, otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_mutex_destroy -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa mutex -is invalid. -.It Bq Er EBUSY -.Fa Mutex -is locked by another thread. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_mutex_init 3 , -.Xr pthread_mutex_lock 3 , -.Xr pthread_mutex_trylock 3 , -.Xr pthread_mutex_unlock 3 -.Sh STANDARDS -.Fn pthread_mutex_destroy -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_mutex_init.3 b/lib/libpthread/man/pthread_mutex_init.3 deleted file mode 100644 index d5292ff8e107..000000000000 --- a/lib/libpthread/man/pthread_mutex_init.3 +++ /dev/null @@ -1,75 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 29, 1998 -.Dt PTHREAD_MUTEX_INIT 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_mutex_init -.Nd create a mutex -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_mutex_init "pthread_mutex_t *mutex" "const pthread_mutexattr_t *attr" -.Sh DESCRIPTION -The -.Fn pthread_mutex_init -function creates a new mutex, with attributes specified with -.Fa attr . -If -.Fa attr -is NULL the default attributes are used. -.Sh RETURN VALUES -If successful, -.Fn pthread_mutex_init -will return zero and put the new mutex id into -.Fa mutex , -otherwise an error number will be returned to indicate the error. -.Sh ERRORS -.Fn pthread_mutex_init -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa attr -is invalid. -.It Bq Er ENOMEM -The process cannot allocate enough memory to create another mutex. -.It Bq Er EAGAIN -The temporarily lacks the resources to create another mutex. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_mutex_destroy 3 , -.Xr pthread_mutex_lock 3 , -.Xr pthread_mutex_trylock 3 , -.Xr pthread_mutex_unlock 3 -.Sh STANDARDS -.Fn pthread_mutex_init -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_mutex_lock.3 b/lib/libpthread/man/pthread_mutex_lock.3 deleted file mode 100644 index a0aa07d76d6c..000000000000 --- a/lib/libpthread/man/pthread_mutex_lock.3 +++ /dev/null @@ -1,72 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 30, 1998 -.Dt PTHREAD_MUTEX_LOCK 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_mutex_lock -.Nd lock a mutex -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_mutex_lock "pthread_mutex_t *mutex" -.Sh DESCRIPTION -The -.Fn pthread_mutex_lock -function locks -.Fa mutex . -If the mutex is already locked, the calling thread will block until the -mutex becomes available. -.Sh RETURN VALUES -If successful, -.Fn pthread_mutex_lock -will return zero, otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_mutex_lock -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa mutex -is invalid. -.It Bq Er EDEADLK -A deadlock would occur if the thread blocked waiting for -.Fa mutex . -.El -.Pp -.Sh SEE ALSO -.Xr pthread_mutex_destroy 3 , -.Xr pthread_mutex_init 3 , -.Xr pthread_mutex_trylock 3 , -.Xr pthread_mutex_unlock 3 -.Sh STANDARDS -.Fn pthread_mutex_lock -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_mutex_trylock.3 b/lib/libpthread/man/pthread_mutex_trylock.3 deleted file mode 100644 index 9f283801e549..000000000000 --- a/lib/libpthread/man/pthread_mutex_trylock.3 +++ /dev/null @@ -1,73 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 30, 1998 -.Dt PTHREAD_MUTEX_TRYLOCK 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_mutex_trylock -.Nd attempt to lock a mutex without blocking -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_mutex_trylock "pthread_mutex_t *mutex" -.Sh DESCRIPTION -The -.Fn pthread_mutex_trylock -function locks -.Fa mutex . -If the mutex is already locked, -.Fn pthread_mutex_trylock -will not block waiting for the mutex, but will return an error condition. -.Sh RETURN VALUES -If successful, -.Fn pthread_mutex_trylock -will return zero, otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_mutex_trylock -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa mutex -is invalid. -.It Bq Er EBUSY -.Fa Mutex -is already locked. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_mutex_destroy 3 , -.Xr pthread_mutex_init 3 , -.Xr pthread_mutex_lock 3 , -.Xr pthread_mutex_unlock 3 -.Sh STANDARDS -.Fn pthread_mutex_trylock -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_mutex_unlock.3 b/lib/libpthread/man/pthread_mutex_unlock.3 deleted file mode 100644 index 95ba7e685110..000000000000 --- a/lib/libpthread/man/pthread_mutex_unlock.3 +++ /dev/null @@ -1,72 +0,0 @@ -.\" Copyright (c) 1997 Brian Cully <shmit@kublai.com> -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd July 30, 1998 -.Dt PTHREAD_MUTEX_UNLOCK 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_mutex_unlock -.Nd unlock a mutex -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_mutex_unlock "pthread_mutex_t *mutex" -.Sh DESCRIPTION -If the current thread holds the lock on -.Fa mutex , -then the -.Fn pthread_mutex_unlock -function unlocks -.Fa mutex . -.Sh RETURN VALUES -If successful, -.Fn pthread_mutex_unlock -will return zero, otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_mutex_trylock -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa mutex -is invalid. -.It Bq Er EPERM -The current thread does not hold a lock on -.Fa mutex . -.El -.Pp -.Sh SEE ALSO -.Xr pthread_mutex_destroy 3 , -.Xr pthread_mutex_init 3 , -.Xr pthread_mutex_lock 3 , -.Xr pthread_mutex_trylock 3 -.Sh STANDARDS -.Fn pthread_mutex_unlock -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_once.3 b/lib/libpthread/man/pthread_once.3 deleted file mode 100644 index fc50d56bf25a..000000000000 --- a/lib/libpthread/man/pthread_once.3 +++ /dev/null @@ -1,100 +0,0 @@ -.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_ONCE 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_once -.Nd dynamic package initialization -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Pp -pthread_once -.Fa once_control -= PTHREAD_ONCE_INIT; -.Ft int -.Fn pthread_once "pthread_once_t *once_control" "void (*init_routine)(void)" -.Sh DESCRIPTION -The first call to -.Fn pthread_once -by any thread in a process, with a given -.Fa once_control , -will call the -.Fn init_routine -with no arguments. Subsequent calls to -.Fn pthread_once -with the same -.Fa once_control -will not call the -.Fn init_routine . -On return from -.Fn pthread_once , -it is guaranteed that -.Fn init_routine -has completed. The -.Fa once_control -parameter is used to determine whether the associated initialization -routine has been called. -.Pp -The function -.Fn pthread_once -is not a cancellation point. However, if -.Fn init_routine -is a cancellation point and is cancelled, the effect on -.Fa once_control is as if -.Fn pthread_once -was never called. -.Pp -The constant -.Fa PTHREAD_ONCE_INIT -is defined by header -.Aq Pa pthread.h . -.Pp -The behavior of -.Fn pthread_once -is undefined if -.Fa once_control -has automatic storage duration or is not initialized by -.Fa PTHREAD_ONCE_INIT . -.Pp -.Sh RETURN VALUES -If successful, the -.Fn pthread_once -function will return zero. Otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -None. -.Pp -.Sh STANDARDS -.Fn pthread_once -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_rwlock_destroy.3 b/lib/libpthread/man/pthread_rwlock_destroy.3 deleted file mode 100644 index 74532745dd74..000000000000 --- a/lib/libpthread/man/pthread_rwlock_destroy.3 +++ /dev/null @@ -1,80 +0,0 @@ -.\" Copyright (c) 1998 Alex Nash -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. -.\" -.\" $Id$ -.\" -.Dd August 4, 1998 -.Dt PTHREAD_RWLOCK_DESTROY 3 -.Os -.Sh NAME -.Nm pthread_rwlock_destroy -.Nd destroy a read/write lock -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_rwlock_destroy "pthread_rwlock_t *lock" -.Sh DESCRIPTION -The -.Fn pthread_rwlock_destroy -function is used to destroy a read/write lock previously created with -.Fn pthread_rwlock_init . -.Sh RETURN VALUES -If successful, the -.Fn pthread_rwlock_destroy -function will return zero. Otherwise an error number will be returned -to indicate the error. -.Sh SEE ALSO -.Xr pthread_rwlock_init 3 , -.Sh STANDARDS -The -.Fn pthread_rwlock_destroy -function is expected to conform to -.St -susv2 . -.Sh ERRORS -The -.Fn pthread_rwlock_destroy -function will fail if: -.Bl -tag -width Er -.It Bq Er EPERM -The caller does not have the privilege to perform the operation. -.El -.Pp -The -.Fn pthread_rwlock_destroy -function may fail if: -.Bl -tag -width Er -.It Bq Er EBUSY -The system has detected an attempt to destroy the object referenced by -.Fa lock -while it is locked. -.It Bq Er EINVAL -The value specified by -.Fa lock -is invalid. -.El -.Sh HISTORY -The -.Fn pthread_rwlock_destroy -function first appeared in -.Fx 3.0 . diff --git a/lib/libpthread/man/pthread_rwlock_init.3 b/lib/libpthread/man/pthread_rwlock_init.3 deleted file mode 100644 index a56169507b48..000000000000 --- a/lib/libpthread/man/pthread_rwlock_init.3 +++ /dev/null @@ -1,99 +0,0 @@ -.\" Copyright (c) 1998 Alex Nash -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. -.\" -.\" $Id$ -.\" -.Dd August 4, 1998 -.Dt PTHREAD_RWLOCK_INIT 3 -.Os -.Sh NAME -.Nm pthread_rwlock_init -.Nd initialize a read/write lock -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_rwlock_init "pthread_rwlock_t *lock" "const pthread_rwlockattr_t *attr" -.Sh DESCRIPTION -The -.Fn pthread_rwlock_init -function is used to initialize a read/write lock, with attributes -specified by -.Fa attr . -If -.Fa attr -is NULL, the default read/write lock attributes are used. -.Pp -The results of calling -.Fn pthread_rwlock_init -with an already initialized lock are undefined. -.Sh RETURN VALUES -If successful, the -.Fn pthread_rwlock_init -function will return zero. Otherwise an error number will be returned -to indicate the error. -.Sh SEE ALSO -.Xr pthread_rwlock_destroy 3 , -.Xr pthread_rwlockattr_init 3 , -.Xr pthread_rwlockattr_setpshared 3 -.Sh STANDARDS -The -.Fn pthread_rwlock_init -function is expected to conform to -.St -susv2 . -.Sh ERRORS -The -.Fn pthread_rwlock_init -function will fail if: -.Bl -tag -width Er -.It Bq Er EAGAIN -The system lacked the necessary resources (other than memory) to -initialize the lock. -.It Bq Er ENOMEM -Insufficient memory exists to initialize the lock. -.It Bq Er EPERM -The caller does not have sufficient privilege to perform the -operation. -.El -.Pp -The -.Fn pthread_rwlock_init -function may fail if: -.Bl -tag -width Er -.It Bq Er EBUSY -The system has detected an attempt to re-initialize the object -referenced by -.Fa lock , -a previously initialized but not yet destroyed read/write lock. -.It Bq Er EINVAL -The value specified by -.Fa attr -is invalid. -.El -.Sh HISTORY -The -.Fn pthread_rwlock_init -function first appeared in -.Fx 3.0 . -.Sh BUGS -The PTHREAD_PROCESS_SHARED attribute is not supported. diff --git a/lib/libpthread/man/pthread_rwlock_rdlock.3 b/lib/libpthread/man/pthread_rwlock_rdlock.3 deleted file mode 100644 index 9181be96cd5d..000000000000 --- a/lib/libpthread/man/pthread_rwlock_rdlock.3 +++ /dev/null @@ -1,122 +0,0 @@ -.\" Copyright (c) 1998 Alex Nash -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. -.\" -.\" $Id$ -.\" -.Dd August 4, 1998 -.Dt PTHREAD_RWLOCK_RDLOCK 3 -.Os -.Sh NAME -.Nm pthread_rwlock_rdlock , -.Nm pthread_rwlock_tryrdlock -.Nd acquire a read/write lock for reading -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_rwlock_rdlock "pthread_rwlock_t *lock" -.Ft int -.Fn pthread_rwlock_tryrdlock "pthread_rwlock_t *lock" -.Sh DESCRIPTION -The -.Fn pthread_rwlock_rdlock -function acquires a read lock on -.Fa lock -provided that -.Fa lock -is not presently held for writing and no writer threads are -presently blocked on the lock. If the read lock cannot be -immediately acquired, the calling thread blocks until it can -acquire the lock. -.Pp -The -.Fn pthread_rwlock_tryrdlock -function performs the same action, but does not block if the lock -cannot be immediately obtained (i.e. the lock is held for writing -or there are waiting writers). -.Pp -A thread may hold multiple concurrent read locks. If so, -.Fn pthread_rwlock_unlock -must be called once for each lock obtained. -.Pp -The results of acquiring a read lock while the calling thread holds -a write lock are undefined. -.Sh IMPLEMENTATION NOTES -To prevent writer starvation, writers are favored over readers. -.Sh RETURN VALUES -If successful, the -.Fn pthread_rwlock_rdlock -and -.Fn pthread_rwlock_tryrdlock -functions will return zero. Otherwise an error number will be returned -to indicate the error. -.Sh SEE ALSO -.Xr pthread_rwlock_init 3 , -.Xr pthread_rwlock_trywrlock 3 , -.Xr pthread_rwlock_unlock 3 , -.Xr pthread_rwlock_wrlock 3 -.Sh STANDARDS -The -.Fn pthread_rwlock_rdlock -and -.Fn pthread_rwlock_tryrdlock -functions are expected to conform to -.St -susv2 . -.Sh ERRORS -The -.Fn pthread_rwlock_tryrdlock -function will fail if: -.Bl -tag -width Er -.It Bq Er EBUSY -The lock could not be acquired because a writer holds the lock or -was blocked on it. -.El -.Pp -The -.Fn pthread_rwlock_rdlock -and -.Fn pthread_rwlock_tryrdlock -functions may fail if: -.Bl -tag -width Er -.It Bq Er EAGAIN -The lock could not be acquired because the maximum number of read locks -against -.Fa lock -has been exceeded. -.It Bq Er EDEADLK -The current thread already owns -.Fa lock -for writing. -.It Bq Er EINVAL -The value specified by -.Fa lock -is invalid. -.It Bq Er ENOMEM -Insufficient memory exists to initialize the lock (applies to -statically initialized locks only). -.El -.Sh HISTORY -The -.Fn pthread_rwlock_rdlock -function first appeared in -.Fx 3.0 . diff --git a/lib/libpthread/man/pthread_rwlock_unlock.3 b/lib/libpthread/man/pthread_rwlock_unlock.3 deleted file mode 100644 index 1c9fd05797ad..000000000000 --- a/lib/libpthread/man/pthread_rwlock_unlock.3 +++ /dev/null @@ -1,79 +0,0 @@ -.\" Copyright (c) 1998 Alex Nash -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. -.\" -.\" $Id$ -.\" -.Dd August 4, 1998 -.Dt PTHREAD_RWLOCK_UNLOCK 3 -.Os -.Sh NAME -.Nm pthread_rwlock_unlock -.Nd release a read/write lock -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_rwlock_unlock "pthread_rwlock_t *lock" -.Sh DESCRIPTION -The -.Fn pthread_rwlock_unlock -function is used to release the read/write lock previously obtained by -.Fn pthread_rwlock_rdlock , -.Fn pthread_rwlock_wrlock , -.Fn pthread_rwlock_tryrdlock , -or -.Fn pthread_rwlock_trywrlock . -.Sh RETURN VALUES -If successful, the -.Fn pthread_rwlock_unlock -function will return zero. Otherwise an error number will be returned -to indicate the error. -.Pp -The results are undefined if -.Fa lock -is not held by the calling thread. -.Sh SEE ALSO -.Xr pthread_rwlock_rdlock 3 , -.Xr pthread_rwlock_wrlock 3 -.Sh STANDARDS -The -.Fn pthread_rwlock_unlock -function is expected to conform to -.St -susv2 . -.Sh ERRORS -The -.Fn pthread_rwlock_unlock -function may fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa lock -is invalid. -.It Bq Er EPERM -The current thread does not own the read/write lock. -.El -.Sh HISTORY -The -.Fn pthread_rwlock_unlock -function first appeared in -.Fx 3.0 . diff --git a/lib/libpthread/man/pthread_rwlock_wrlock.3 b/lib/libpthread/man/pthread_rwlock_wrlock.3 deleted file mode 100644 index a5a367406566..000000000000 --- a/lib/libpthread/man/pthread_rwlock_wrlock.3 +++ /dev/null @@ -1,102 +0,0 @@ -.\" Copyright (c) 1998 Alex Nash -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. -.\" -.\" $Id$ -.\" -.Dd August 4, 1998 -.Dt PTHREAD_RWLOCK_WRLOCK 3 -.Os -.Sh NAME -.Nm pthread_rwlock_wrlock , -.Nm pthread_rwlock_trywrlock -.Nd acquire a read/write lock for writing -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_rwlock_wrlock "pthread_rwlock_t *lock" -.Ft int -.Fn pthread_rwlock_trywrlock "pthread_rwlock_t *lock" -.Sh DESCRIPTION -The -.Fn pthread_rwlock_wrlock -function blocks until a write lock can be acquired against -.Fa lock . -The -.Fn pthread_rwlock_trywrlock -function performs the same action, but does not block if the lock -cannot be immediately obtained. -.Pp -The results are undefined if the calling thread already holds the -lock at the time the call is made. -.Sh IMPLEMENTATION NOTES -To prevent writer starvation, writers are favored over readers. -.Sh RETURN VALUES -If successful, the -.Fn pthread_rwlock_wrlock -and -.Fn pthread_rwlock_trywrlock -functions will return zero. Otherwise an error number will be returned -to indicate the error. -.Sh SEE ALSO -.Xr pthread_rwlock_trywrlock 3 , -.Xr pthread_rwlock_unlock 3 , -.Xr pthread_rwlock_wrlock 3 -.Sh STANDARDS -The -.Fn pthread_rwlock_wrlock -and -.Fn pthread_rwlock_trywrlock -functions are expected to conform to -.St -susv2 . -.Sh ERRORS -The -.Fn pthread_rwlock_trywrlock -function will fail if: -.Bl -tag -width Er -.It Bq Er EBUSY -The calling thread is not able to acquire the lock without blocking. -.El -.Pp -The -.Fn pthread_rwlock_wrlock -and -.Fn pthread_rwlock_trywrlock -functions may fail if: -.Bl -tag -width Er -.It Bq Er EDEADLK -The calling thread already owns the read/write lock (for reading -or writing). -.It Bq Er EINVAL -The value specified by -.Fa lock -is invalid. -.It Bq Er ENOMEM -Insufficient memory exists to initialize the lock (applies to -statically initialized locks only). -.El -.Sh HISTORY -The -.Fn pthread_rwlock_wrlock -function first appeared in -.Fx 3.0 . diff --git a/lib/libpthread/man/pthread_rwlockattr_destroy.3 b/lib/libpthread/man/pthread_rwlockattr_destroy.3 deleted file mode 100644 index ee3c4054d642..000000000000 --- a/lib/libpthread/man/pthread_rwlockattr_destroy.3 +++ /dev/null @@ -1,68 +0,0 @@ -.\" Copyright (c) 1998 Alex Nash -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. -.\" -.\" $Id$ -.\" -.Dd August 4, 1998 -.Dt PTHREAD_RWLOCKATTR_DESTROY 3 -.Os -.Sh NAME -.Nm pthread_rwlockattr_destroy -.Nd destroy a read/write lock -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_rwlockattr_destroy "pthread_rwlockattr_t *attr" -.Sh DESCRIPTION -The -.Fn pthread_rwlockattr_destroy -function is used to destroy a read/write lock attribute object -previously created with -.Fn pthread_rwlockattr_init . -.Sh RETURN VALUES -If successful, the -.Fn pthread_rwlockattr_destroy -function will return zero. Otherwise an error number will be returned -to indicate the error. -.Sh SEE ALSO -.Xr pthread_rwlockattr_init 3 , -.Sh STANDARDS -The -.Fn pthread_rwlockattr_destroy -function is expected to conform to -.St -susv2 . -.Sh ERRORS -.Fn pthread_rwlockattr_destroy -may fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa attr -is invalid. -.El -.Sh HISTORY -The -.Fn pthread_rwlockattr_destroy -function first appeared in -.Fx 3.0 . diff --git a/lib/libpthread/man/pthread_rwlockattr_getpshared.3 b/lib/libpthread/man/pthread_rwlockattr_getpshared.3 deleted file mode 100644 index 8e8160bc0f33..000000000000 --- a/lib/libpthread/man/pthread_rwlockattr_getpshared.3 +++ /dev/null @@ -1,80 +0,0 @@ -.\" Copyright (c) 1998 Alex Nash -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. -.\" -.\" $Id$ -.\" -.Dd August 4, 1998 -.Dt PTHREAD_RWLOCKATTR_GETPSHARED 3 -.Os -.Sh NAME -.Nm pthread_rwlockattr_getpshared -.Nd set the process shared attribute -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_rwlockattr_getpshared "pthread_rwlockattr_t *attr" "int *pshared" -.Sh DESCRIPTION -The -.Fn pthread_rwlockattr_getpshared -function is used to get the process shared setting of a read/write -lock attribute object. The setting is returned via -.Fa pshared , -and may be one of two values: -.Bl -hang -offset flag -width 123456789012345678901234 -.It Ar PTHREAD_PROCESS_SHARED -Any thread of any process that has access to the memory where the -read/write lock resides can manipulate the lock. -.It Ar PTHREAD_PROCESS_PRIVATE -Only threads created within the same process as the thread that -initialized the read/write lock can manipulate the lock. This is -the default value. -.El -.Sh RETURN VALUES -If successful, the -.Fn pthread_rwlockattr_getpshared -function will return zero. Otherwise an error number will be returned -to indicate the error. -.Sh SEE ALSO -.Xr pthread_rwlock_init 3 , -.Xr pthread_rwlockattr_init 3 , -.Xr pthread_rwlockattr_setpshared 3 -.Sh STANDARDS -The -.Fn pthread_rwlockattr_getpshared -function is expected to conform to -.St -susv2 . -.Sh ERRORS -.Fn pthread_rwlockattr_getpshared -may fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa attr -is invalid. -.El -.Sh HISTORY -The -.Fn pthread_rwlockattr_getpshared -function first appeared in -.Fx 3.0 . diff --git a/lib/libpthread/man/pthread_rwlockattr_init.3 b/lib/libpthread/man/pthread_rwlockattr_init.3 deleted file mode 100644 index 88271216f899..000000000000 --- a/lib/libpthread/man/pthread_rwlockattr_init.3 +++ /dev/null @@ -1,67 +0,0 @@ -.\" Copyright (c) 1998 Alex Nash -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. -.\" -.\" $Id$ -.\" -.Dd August 4, 1998 -.Dt PTHREAD_RWLOCKATTR_INIT 3 -.Os -.Sh NAME -.Nm pthread_rwlockattr_init -.Nd initialize a read/write lock -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_rwlockattr_init "pthread_rwlockattr_t *attr" -.Sh DESCRIPTION -The -.Fn pthread_rwlockattr_init -function is used to initialize a read/write lock attributes object. -.Sh RETURN VALUES -If successful, the -.Fn pthread_rwlockattr_init -function will return zero. Otherwise an error number will be returned -to indicate the error. -.Sh SEE ALSO -.Xr pthread_rwlock_init 3 , -.Xr pthread_rwlockattr_destroy 3 , -.Xr pthread_rwlockattr_getpshared 3 -.Xr pthread_rwlockattr_setpshared 3 -.Sh STANDARDS -The -.Fn pthread_rwlockattr_init -function is expected to conform to -.St -susv2 . -.Sh ERRORS -.Fn pthread_rwlockattr_init -will fail if: -.Bl -tag -width Er -.It Bq Er ENOMEM -Insufficient memory exists to initialize the attribute object. -.El -.Sh HISTORY -The -.Fn pthread_rwlockattr_init -function first appeared in -.Fx 3.0 . diff --git a/lib/libpthread/man/pthread_rwlockattr_setpshared.3 b/lib/libpthread/man/pthread_rwlockattr_setpshared.3 deleted file mode 100644 index e63debfc400b..000000000000 --- a/lib/libpthread/man/pthread_rwlockattr_setpshared.3 +++ /dev/null @@ -1,86 +0,0 @@ -.\" Copyright (c) 1998 Alex Nash -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. -.\" -.\" $Id$ -.\" -.Dd August 4, 1998 -.Dt PTHREAD_RWLOCKATTR_SETPSHARED 3 -.Os -.Sh NAME -.Nm pthread_rwlockattr_setpshared -.Nd set the process shared attribute -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_rwlockattr_setpshared "pthread_rwlockattr_t *attr" "int *pshared" -.Sh DESCRIPTION -The -.Fn pthread_rwlockattr_setpshared -function sets the process shared attribute of -.Fa attr -to the value referenced by -.Fa pshared . -.Fa pshared -may be one of two values: -.Bl -hang -offset flag -width 123456789012345678901234 -.It Ar PTHREAD_PROCESS_SHARED -Any thread of any process that has access to the memory where the -read/write lock resides can manipulate the lock. -.It Ar PTHREAD_PROCESS_PRIVATE -Only threads created within the same process as the thread that -initialized the read/write lock can manipulate the lock. This is -the default value. -.El -.Sh RETURN VALUES -If successful, the -.Fn pthread_rwlockattr_setpshared -function will return zero. Otherwise an error number will be returned -to indicate the error. -.Sh SEE ALSO -.Xr pthread_rwlock_init 3 , -.Xr pthread_rwlockattr_init 3 , -.Xr pthread_rwlockattr_setpshared 3 -.Sh STANDARDS -The -.Fn pthread_rwlockattr_setpshared -function is expected to conform to -.St -susv2 . -.Sh ERRORS -.Fn pthread_rwlockattr_setpshared -will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The value specified by -.Fa attr -or -.Fa pshared -is invalid. -.El -.Sh HISTORY -The -.Fn pthread_rwlockattr_setpshared -function first appeared in -.Fx 3.0 . -.Sh BUGS -The PTHREAD_PROCESS_SHARED attribute is not supported. diff --git a/lib/libpthread/man/pthread_self.3 b/lib/libpthread/man/pthread_self.3 deleted file mode 100644 index 46c118af09f8..000000000000 --- a/lib/libpthread/man/pthread_self.3 +++ /dev/null @@ -1,59 +0,0 @@ -.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_SELF 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_self -.Nd get the calling thread's ID -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft pthread_t -.Fn pthread_self "void" -.Sh DESCRIPTION -The -.Fn pthread_self -function returns the thread ID of the calling thread. -.Sh RETURN VALUES -The -.Fn pthread_self -function returns the thread ID of the calling thread. -.Sh ERRORS -None. -.Pp -.Sh SEE ALSO -.Xr pthread_create 3 , -.Xr pthread_equal 3 -.Sh STANDARDS -.Fn pthread_self -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_setspecific.3 b/lib/libpthread/man/pthread_setspecific.3 deleted file mode 100644 index e28cf568213b..000000000000 --- a/lib/libpthread/man/pthread_setspecific.3 +++ /dev/null @@ -1,91 +0,0 @@ -.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. -.\" 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, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by John Birrell. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. -.\" -.Dd April 4, 1996 -.Dt PTHREAD_SETSPECIFIC 3 -.Os BSD 4 -.Sh NAME -.Nm pthread_setspecific -.Nd set a thread-specific data value -.Sh SYNOPSIS -.Fd #include <pthread.h> -.Ft int -.Fn pthread_setspecific "pthread_key_t key" "const void *value" -.Sh DESCRIPTION -The -.Fn pthread_setspecific -function associates a thread-specific value with a -.Fa key -obtained via a previous call to -.Fn pthread_key_create . -Different threads man bind different values to the same key. These values are -typically pointers to blocks of dynamically allocated memory that have been -reserved for use by the calling thread. -.Pp -The effect of calling -.Fn pthread_setspecific -with a key value not obtained from -.Fn pthread_key_create -or after -.Fa key -has been deleted with -.Fn pthread_key_delete -is undefined. -.Pp -.Fn pthread_setspecific -may be called from a thread-specific data destructor function, however this -may result in lost storage or infinite loops. -.Sh RETURN VALUES -If successful, the -.Fn pthread_setspecific -function will return zero. Otherwise an error number will be returned to -indicate the error. -.Sh ERRORS -.Fn pthread_setspecific -will fail if: -.Bl -tag -width Er -.It Bq Er ENOMEM -Insufficient memory exists to associate the value with the -.Fa key . -.It Bq Er EINVAL -The -.Fa key -value is invalid. -.El -.Pp -.Sh SEE ALSO -.Xr pthread_getspecific 3 , -.Xr pthread_key_create 3 , -.Xr pthread_key_delete 3 -.Sh STANDARDS -.Fn pthread_setspecific -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. |