summaryrefslogtreecommitdiff
path: root/lib/libpthread/man
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2004-01-15 11:27:05 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2004-01-15 11:27:05 +0000
commit09fb9af609d408ace96974cea3b94078bba88609 (patch)
treedb1225ec2d202dbf937de12f49998c1ceef6d358 /lib/libpthread/man
parente77de7b8c154d12569acc43adf4e25ba02bfcf63 (diff)
group and list thread functions;
also add missing pages to SEE ALSO; prodded by tedu@, based on freebsd's page, and helped by marc@; ok marc@ tedu@
Diffstat (limited to 'lib/libpthread/man')
-rw-r--r--lib/libpthread/man/pthreads.3202
1 files changed, 200 insertions, 2 deletions
diff --git a/lib/libpthread/man/pthreads.3 b/lib/libpthread/man/pthreads.3
index 282702ff6e9..db1011387dd 100644
--- a/lib/libpthread/man/pthreads.3
+++ b/lib/libpthread/man/pthreads.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pthreads.3,v 1.21 2004/01/02 09:28:36 jmc Exp $
+.\" $OpenBSD: pthreads.3,v 1.22 2004/01/15 11:27:04 jmc Exp $
.\" David Leonard <d@openbsd.org>, 1998. Public domain.
.Dd August 17, 1998
.Dt PTHREADS 3
@@ -37,6 +37,191 @@ signal mask, and name (as set by
If the environment variable
.Ev PTHREAD_DEBUG
is defined additional information is displayed.
+.Pp
+For the purpose of this document,
+the functions available are grouped in the following categories.
+For further information, see the individual man page for each function.
+.Pp
+.Bl -dash -offset indent -compact
+.It
+Attribute Object Routines
+.It
+Cancellation Routines
+.It
+Condition Variable Routines
+.It
+Data Management Routines
+.It
+Mutex Routines
+.It
+Non Portable Extensions
+.It
+Read/Write Lock Routines
+.It
+Thread Routines
+.El
+.Ss Attribute Object Routines
+The functions available are as follows:
+.Pp
+.Bl -tag -width "pthread_attr_getdetachstate()" -compact
+.It Fn pthread_attr_init
+Initialise a threads attribute object.
+.It Fn pthread_attr_destroy
+Destroy a threads attribute object.
+.It Fn pthread_attr_getdetachstate
+Get detachstate attribute.
+.It Fn pthread_attr_setdetachstate
+Set detachstate attribute.
+.It Fn pthread_attr_getstackaddr
+Get stackaddr attribute.
+.It Fn pthread_attr_setstackaddr
+Set stackaddr attribute.
+.It Fn pthread_attr_getstacksize
+Get stacksize attribute.
+.It Fn pthread_attr_setstacksize
+Set stacksize attribute.
+.El
+.Ss Cancellation Routines
+The functions available are as follows:
+.Pp
+.Bl -tag -width "pthread_setcancelstate()" -compact
+.It Fn pthread_cancel
+Cancel execution of a thread.
+.It Fn pthread_cleanup_pop
+Call the first cleanup routine.
+.It Fn pthread_cleanup_push
+Add a cleanup function for thread exit.
+.It Fn pthread_setcancelstate
+Set cancelability state.
+.It Fn pthread_setcanceltype
+Set cancelability state.
+.It Fn pthread_testcancel
+Set cancelability state.
+.El
+.Ss Condition Variable Routines
+The functions available are as follows:
+.Pp
+.Bl -tag -width "pthread_cond_timedwait()" -compact
+.It Fn pthread_cond_broadcast
+Unblock all threads waiting for a condition variable.
+.It Fn pthread_cond_destroy
+Destroy a condition variable.
+.It Fn pthread_cond_init
+Create a condition variable.
+.It Fn pthread_cond_signal
+Unblock a thread waiting for a condition variable.
+.It Fn pthread_cond_timedwait
+Wait on a condition variable for a specific amount of time.
+.It Fn pthread_cond_wait
+Wait on a condition variable.
+.El
+.Ss Data Management Routines
+The functions available are as follows:
+.Pp
+.Bl -tag -width "pthread_getspecific()" -compact
+.It Fn pthread_getspecific
+Get a thread-specific data value.
+.It Fn pthread_setspecific
+Set a thread-specific data value.
+.It Fn pthread_key_create
+Thread-specific data key creation.
+.It Fn pthread_key_delete
+Delete a thread-specific data key.
+.El
+.Ss Mutex Routines
+The functions available are as follows:
+.Pp
+.Bl -tag -width "pthread_mutexattr_getprioceiling()" -compact
+.It Fn pthread_mutex_destroy
+Free resources allocated for a mutex.
+.It Fn pthread_mutex_init
+Create a mutex.
+.It Fn pthread_mutex_lock
+Lock a mutex.
+.It Fn pthread_mutex_trylock
+Attempt to lock a mutex without blocking.
+.It Fn pthread_mutex_unlock
+Unlock a mutex.
+.It Fn pthread_mutexattr_init
+Mutex attribute operations.
+.It Fn pthread_mutexattr_destroy
+Mutex attribute operations.
+.It Fn pthread_mutexattr_getprioceiling
+Mutex attribute operations.
+.It Fn pthread_mutexattr_setprioceiling
+Mutex attribute operations.
+.It Fn pthread_mutexattr_getprotocol
+Mutex attribute operations.
+.It Fn pthread_mutexattr_setprotocol
+Mutex attribute operations.
+.It Fn pthread_mutexattr_gettype
+Mutex attribute operations.
+.It Fn pthread_mutexattr_settype
+Mutex attribute operations.
+.El
+.Ss Non Portable Extensions
+The functions available are as follows:
+.Pp
+.Bl -tag -width "pthread_set_name_np()" -compact
+.It Fn pthread_main_np
+Identify the main thread.
+.It Fn pthread_set_name_np
+Set the name of a thread.
+.It Fn pthread_single_np
+Switch thread scheduling mode.
+.It Fn pthread_multi_np
+Switch thread scheduling mode.
+.El
+.Ss Read/Write Lock Routines
+The functions available are as follows:
+.Pp
+.Bl -tag -width "pthread_rwlockattr_getpshared()" -compact
+.It Fn pthread_rwlock_destroy
+Destroy a read/write lock.
+.It Fn pthread_rwlock_init
+Initialise a read/write lock.
+.It Fn pthread_rwlock_rdlock
+Acquire a read/write lock for reading.
+.It Fn pthread_rwlock_unlock
+Release a read/write lock.
+.It Fn pthread_rwlock_wrlock
+Acquire a read/write lock for writing.
+.It Fn pthread_rwlockattr_destroy
+Destroy a read/write lock.
+.It Fn pthread_rwlockattr_getpshared
+Get the process shared attribute.
+.It Fn pthread_rwlockattr_init
+Initialise a read/write lock.
+.It Fn pthread_rwlockattr_setpshared
+Set the process shared attribute.
+.El
+.Ss Thread Routines
+The functions available are as follows:
+.Pp
+.Bl -tag -width "pthread_getconcurrency()" -compact
+.It Fn pthread_create
+Create a new thread.
+.It Fn pthread_detach
+Detach a thread.
+.It Fn pthread_equal
+Compare thread IDs.
+.It Fn pthread_exit
+Terminate the calling thread.
+.It Fn pthread_getconcurrency
+Get level of concurrency.
+.It Fn pthread_setconcurrency
+Set level of concurrency.
+.It Fn pthread_join
+Wait for thread termination.
+.It Fn pthread_kill
+Send a signal to a specific thread.
+.It Fn pthread_once
+Dynamic package initialisation.
+.It Fn pthread_self
+Get the calling thread's ID.
+.It Fn pthread_sigmask
+Examine/change a thread's signal mask.
+.El
.Ss Thread states
Threads can be in one of these states:
.Pp
@@ -283,6 +468,11 @@ The status display verbosity is controlled by the
environment variable.
.El
.Sh SEE ALSO
+.Xr pthread_attr_init 3 ,
+.Xr pthread_attr_setdetachstate 3 ,
+.Xr pthread_attr_setstackaddr 3 ,
+.Xr pthread_attr_setstacksize 3 ,
+.Xr pthread_cancel 3 ,
.Xr pthread_cleanup_pop 3 ,
.Xr pthread_cleanup_push 3 ,
.Xr pthread_cond_broadcast 3 ,
@@ -300,11 +490,13 @@ environment variable.
.Xr pthread_key_create 3 ,
.Xr pthread_key_delete 3 ,
.Xr pthread_kill 3 ,
+.Xr pthread_main_np 3 ,
.Xr pthread_mutex_destroy 3 ,
.Xr pthread_mutex_init 3 ,
.Xr pthread_mutex_lock 3 ,
.Xr pthread_mutex_trylock 3 ,
.Xr pthread_mutex_unlock 3 ,
+.Xr pthread_mutexattr 3 ,
.Xr pthread_once 3 ,
.Xr pthread_rwlock_destroy 3 ,
.Xr pthread_rwlock_init 3 ,
@@ -315,8 +507,14 @@ environment variable.
.Xr pthread_rwlockattr_getpshared 3 ,
.Xr pthread_rwlockattr_init 3 ,
.Xr pthread_rwlockattr_setpshared 3 ,
+.Xr pthread_schedparam 3 ,
.Xr pthread_self 3 ,
-.Xr pthread_setspecific 3
+.Xr pthread_set_name_np 3 ,
+.Xr pthread_setspecific 3 ,
+.Xr pthread_sigmask 3 ,
+.Xr pthread_single_np 3 ,
+.Xr pthread_suspend_np 3 ,
+.Xr pthread_testcancel 3
.Sh STANDARDS
The user-level thread library provides functions that
conform to ISO/IEC 9945-1 ANSI/IEEE