Assorted markup fixes.
This commit is contained in:
parent
fcd08fd18b
commit
62909c52c9
@ -41,14 +41,15 @@
|
||||
.Sh DESCRIPTION
|
||||
POSIX threads are a set of functions that support applications with
|
||||
requirements for multiple flows of control, called
|
||||
.Fa threads ,
|
||||
.Em threads ,
|
||||
within a process.
|
||||
Multithreading is used to improve the performance of a
|
||||
program.
|
||||
.Pp
|
||||
The POSIX thread functions are summarized in this section in the following
|
||||
groups:
|
||||
.Bl -bullet -offset indent
|
||||
.Pp
|
||||
.Bl -bullet -offset indent -compact
|
||||
.It
|
||||
Thread Routines
|
||||
.It
|
||||
@ -64,11 +65,14 @@ Per-Thread Context Routines
|
||||
.It
|
||||
Cleanup Routines
|
||||
.El
|
||||
.Sh THREAD ROUTINES
|
||||
.Bl -tag -width Er
|
||||
.Ss Thread Routines
|
||||
.Bl -tag -width indent
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_create "pthread_t *thread" "const pthread_attr_t *attr" "void *(*start_routine)(void *)" "void *arg"
|
||||
.Fo pthread_create
|
||||
.Fa "pthread_t *thread" "const pthread_attr_t *attr"
|
||||
.Fa "void *\*[lp]*start_routine\*[rp]\*[lp]void *\*[rp]" "void *arg"
|
||||
.Fc
|
||||
.Xc
|
||||
Creates a new thread of execution.
|
||||
.It Xo
|
||||
@ -103,7 +107,7 @@ Causes the calling thread to wait for the termination of the specified thread.
|
||||
Delivers a signal to a specified thread.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_once "pthread_once_t *once_control" "void (*init_routine)(void)"
|
||||
.Fn pthread_once "pthread_once_t *once_control" "void \*[lp]*init_routine\*[rp]\*[lp]void\*[rp]"
|
||||
.Xc
|
||||
Calls an initialization routine once.
|
||||
.It Xo
|
||||
@ -132,8 +136,8 @@ Creates a cancellation point in the calling thread.
|
||||
.Xc
|
||||
Allows the scheduler to run another thread instead of the current one.
|
||||
.El
|
||||
.Sh ATTRIBUTE OBJECT ROUTINES
|
||||
.Bl -tag -width Er
|
||||
.Ss Attribute Object Routines
|
||||
.Bl -tag -width indent
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_attr_destroy "pthread_attr_t *attr"
|
||||
@ -141,12 +145,16 @@ Allows the scheduler to run another thread instead of the current one.
|
||||
Destroy a thread attributes object.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_attr_getinheritsched "const pthread_attr_t *attr" "int *inheritsched"
|
||||
.Fo pthread_attr_getinheritsched
|
||||
.Fa "const pthread_attr_t *attr" "int *inheritsched"
|
||||
.Fc
|
||||
.Xc
|
||||
Get the inherit scheduling attribute from a thread attributes object.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_attr_getschedparam "const pthread_attr_t *attr" "struct sched_param *param"
|
||||
.Fo pthread_attr_getschedparam
|
||||
.Fa "const pthread_attr_t *attr" "struct sched_param *param"
|
||||
.Fc
|
||||
.Xc
|
||||
Get the scheduling parameter attribute from a thread attributes object.
|
||||
.It Xo
|
||||
@ -186,7 +194,9 @@ Initialize a thread attributes object with default values.
|
||||
Set the inherit scheduling attribute in a thread attributes object.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_attr_setschedparam "pthread_attr_t *attr" "const struct sched_param *param"
|
||||
.Fo pthread_attr_setschedparam
|
||||
.Fa "pthread_attr_t *attr" "const struct sched_param *param"
|
||||
.Fc
|
||||
.Xc
|
||||
Set the scheduling parameter attribute in a thread attributes object.
|
||||
.It Xo
|
||||
@ -215,8 +225,8 @@ Set the stack address attribute in a thread attributes object.
|
||||
.Xc
|
||||
Set the detach state in a thread attributes object.
|
||||
.El
|
||||
.Sh MUTEX ROUTINES
|
||||
.Bl -tag -width Er
|
||||
.Ss Mutex Routines
|
||||
.Bl -tag -width indent
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_mutexattr_destroy "pthread_mutexattr_t *attr"
|
||||
@ -264,7 +274,9 @@ Set the mutex type attribute that is used when a mutex is created.
|
||||
Destroy a mutex.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_mutex_init "pthread_mutex_t *mutex" "const pthread_mutexattr_t *attr"
|
||||
.Fo pthread_mutex_init
|
||||
.Fa "pthread_mutex_t *mutex" "const pthread_mutexattr_t *attr"
|
||||
.Fc
|
||||
.Xc
|
||||
Initialize a mutex with specified attributes.
|
||||
.It Xo
|
||||
@ -274,7 +286,9 @@ Initialize a mutex with specified attributes.
|
||||
Lock a mutex and block until it becomes available.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_mutex_timedlock "pthread_mutex_t *mutex" "const struct timespec *abstime"
|
||||
.Fo pthread_mutex_timedlock
|
||||
.Fa "pthread_mutex_t *mutex" "const struct timespec *abstime"
|
||||
.Fc
|
||||
.Xc
|
||||
Lock a mutex and block until it becomes available or until the timeout expires.
|
||||
.It Xo
|
||||
@ -289,8 +303,8 @@ including the current thread.
|
||||
.Xc
|
||||
Unlock a mutex.
|
||||
.El
|
||||
.Sh CONDITION VARIABLE ROUTINES
|
||||
.Bl -tag -width Er
|
||||
.Ss Condition Variable Routines
|
||||
.Bl -tag -width indent
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_condattr_destroy "pthread_condattr_t *attr"
|
||||
@ -323,17 +337,21 @@ Initialize a condition variable with specified attributes.
|
||||
Unblock at least one of the threads blocked on the specified condition variable.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_cond_timedwait "pthread_cond_t *cond" "pthread_mutex_t *mutex" "const struct timespec *abstime"
|
||||
.Fo pthread_cond_timedwait
|
||||
.Fa "pthread_cond_t *cond" "pthread_mutex_t *mutex"
|
||||
.Fa "const struct timespec *abstime"
|
||||
.Fc
|
||||
.Xc
|
||||
Wait no longer than the specified time for a condition and lock the specified mutex.
|
||||
Wait no longer than the specified time for a condition
|
||||
and lock the specified mutex.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_cond_wait "pthread_cond_t *" "pthread_mutex_t *mutex"
|
||||
.Xc
|
||||
Wait for a condition and lock the specified mutex.
|
||||
.El
|
||||
.Sh READ/WRITE LOCK ROUTINES
|
||||
.Bl -tag -width Er
|
||||
.Ss Read/Write Lock Routines
|
||||
.Bl -tag -width indent
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_rwlock_destroy "pthread_rwlock_t *lock"
|
||||
@ -341,7 +359,9 @@ Wait for a condition and lock the specified mutex.
|
||||
Destroy a read/write lock object.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_rwlock_init "pthread_rwlock_t *lock" "const pthread_rwlockattr_t *attr"
|
||||
.Fo pthread_rwlock_init
|
||||
.Fa "pthread_rwlock_t *lock" "const pthread_rwlockattr_t *attr"
|
||||
.Fc
|
||||
.Xc
|
||||
Initialize a read/write lock object.
|
||||
.It Xo
|
||||
@ -380,7 +400,9 @@ acquired.
|
||||
Destroy a read/write lock attribute object.
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_rwlockattr_getpshared "const pthread_rwlockattr_t *attr" "int *pshared"
|
||||
.Fo pthread_rwlockattr_getpshared
|
||||
.Fa "const pthread_rwlockattr_t *attr" "int *pshared"
|
||||
.Fc
|
||||
.Xc
|
||||
Retrieve the process shared setting for the read/write lock attribute
|
||||
object.
|
||||
@ -395,11 +417,11 @@ Initialize a read/write lock attribute object.
|
||||
.Xc
|
||||
Set the process shared setting for the read/write lock attribute object.
|
||||
.El
|
||||
.Sh PER-THREAD CONTEXT ROUTINES
|
||||
.Bl -tag -width Er
|
||||
.Ss Per-Thread Context Routines
|
||||
.Bl -tag -width indent
|
||||
.It Xo
|
||||
.Ft int
|
||||
.Fn pthread_key_create "pthread_key_t *key" "void (*routine)(void *)"
|
||||
.Fn pthread_key_create "pthread_key_t *key" "void \*[lp]*routine\*[rp]\*[lp]void *\*[rp]"
|
||||
.Xc
|
||||
Create a thread-specific data key.
|
||||
.It Xo
|
||||
@ -418,8 +440,8 @@ Get the thread-specific value for the specified key.
|
||||
.Xc
|
||||
Set the thread-specific value for the specified key.
|
||||
.El
|
||||
.Sh CLEANUP ROUTINES
|
||||
.Bl -tag -width Er
|
||||
.Ss Cleanup Routines
|
||||
.Bl -tag -width indent
|
||||
.It Xo
|
||||
.Ft void
|
||||
.Fn pthread_cleanup_pop "int execute"
|
||||
@ -428,7 +450,7 @@ Remove the routine at the top of the calling thread's cancellation cleanup
|
||||
stack and optionally invoke it.
|
||||
.It Xo
|
||||
.Ft void
|
||||
.Fn pthread_cleanup_push "void (*routine)(void *)" "void *routine_arg"
|
||||
.Fn pthread_cleanup_push "void \*[lp]*routine\*[rp]\*[lp]void *\*[rp]" "void *routine_arg"
|
||||
.Xc
|
||||
Push the specified cancellation cleanup handler onto the calling thread's
|
||||
cancellation stack.
|
||||
@ -445,7 +467,8 @@ for threaded applications.
|
||||
.Pp
|
||||
By default,
|
||||
.Fa libc_r
|
||||
is built as part of a 'make world'. To disable the build of
|
||||
is built as part of a 'make world'.
|
||||
To disable the build of
|
||||
.Fa libc_r
|
||||
you must supply the '-DNOLIBC_R' option to
|
||||
.Xr make 1 .
|
||||
|
Loading…
x
Reference in New Issue
Block a user