diff options
Diffstat (limited to 'upstream/archlinux/man3/pthread_cond_init.3')
-rw-r--r-- | upstream/archlinux/man3/pthread_cond_init.3 | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/upstream/archlinux/man3/pthread_cond_init.3 b/upstream/archlinux/man3/pthread_cond_init.3 index cfe5dbaa..a89d65b0 100644 --- a/upstream/archlinux/man3/pthread_cond_init.3 +++ b/upstream/archlinux/man3/pthread_cond_init.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_cond_init 3 2023-10-31 "Linux man-pages 6.06" +.TH pthread_cond_init 3 2024-05-19 "Linux man-pages 6.8" . . .SH NAME @@ -18,16 +18,20 @@ operations on conditions . . .SH SYNOPSIS +.nf .B #include <pthread.h> .P .BI "pthread_cond_t " cond " = PTHREAD_COND_INITIALIZER;" .P -.BI "int pthread_cond_init(pthread_cond_t *" cond ", pthread_condattr_t *" cond_attr ");" -.BI "int pthread_cond_signal(pthread_cond_t *" cond ");" -.BI "int pthread_cond_broadcast(pthread_cond_t *" cond ");" -.BI "int pthread_cond_wait(pthread_cond_t *" cond ", pthread_mutex_t *" mutex ");" -.BI "int pthread_cond_timedwait(pthread_cond_t *" cond ", pthread_mutex_t *" mutex ", const struct timespec *" abstime ");" -.BI "int pthread_cond_destroy(pthread_cond_t *" cond ");" +.BI "int pthread_cond_init(pthread_cond_t *" cond , +.BI " pthread_condattr_t *" cond_attr ); +.BI "int pthread_cond_signal(pthread_cond_t *" cond ); +.BI "int pthread_cond_broadcast(pthread_cond_t *" cond ); +.BI "int pthread_cond_wait(pthread_cond_t *" cond ", pthread_mutex_t *" mutex ); +.BI "int pthread_cond_timedwait(pthread_cond_t *" cond ", pthread_mutex_t *" mutex , +.BI " const struct timespec *" abstime ); +.BI "int pthread_cond_destroy(pthread_cond_t *" cond ); +.fi . . .SH DESCRIPTION @@ -110,12 +114,12 @@ except checking that the condition has no waiting threads. . .SH CANCELLATION \fBpthread_cond_wait\fP and \fBpthread_cond_timedwait\fP -are cancellation points. +are cancelation points. If a thread is cancelled while suspended in one of these functions, the thread immediately resumes execution, then locks again the \fImutex\fP argument to \fBpthread_cond_wait\fP and \fBpthread_cond_timedwait\fP, -and finally executes the cancellation. +and finally executes the cancelation. Consequently, cleanup handlers are assured that \fImutex\fP is locked when they are called. |