git: e7015a3834ab - main - pthread_cond_timedwait.3: document pthread_cond_clockwait(3)

Konstantin Belousov <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a6784b7.1d92f.57382f92__301.803385239907$1785169146$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=e7015a3834abe0956e9a8ec6ec4b8e75ea7d71ab

commit e7015a3834abe0956e9a8ec6ec4b8e75ea7d71ab
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-07-25 23:56:03 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-07-27 16:17:29 +0000

    pthread_cond_timedwait.3: document pthread_cond_clockwait(3)
    
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D58463
---
 share/man/man3/Makefile                 |  1 +
 share/man/man3/pthread_cond_timedwait.3 | 32 ++++++++++++++++++++++++++++++--
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile
index cae79b8f8182..2a4dbc426d05 100644
--- a/share/man/man3/Makefile
+++ b/share/man/man3/Makefile
@@ -510,6 +510,7 @@ PTHREAD_MLINKS+=pthread_condattr.3 pthread_condattr_destroy.3 \
 		pthread_condattr.3 pthread_condattr_setclock.3 \
 		pthread_condattr.3 pthread_condattr_getpshared.3 \
 		pthread_condattr.3 pthread_condattr_setpshared.3
+PTHREAD_MLINKS+=pthread_cond_timedwait.3 pthread_cond_clockwait.3
 PTHREAD_MLINKS+=pthread_getconcurrency.3 pthread_setconcurrency.3
 PTHREAD_MLINKS+=pthread_multi_np.3 pthread_single_np.3
 PTHREAD_MLINKS+=pthread_mutexattr.3 pthread_mutexattr_destroy.3 \
diff --git a/share/man/man3/pthread_cond_timedwait.3 b/share/man/man3/pthread_cond_timedwait.3
index 28cc33da1ca2..5a47abed7d99 100644
--- a/share/man/man3/pthread_cond_timedwait.3
+++ b/share/man/man3/pthread_cond_timedwait.3
@@ -41,10 +41,20 @@
 .Fa "pthread_mutex_t *mutex"
 .Fa "const struct timespec *abstime"
 .Fc
+.In time.h
+.Ft int
+.Fo pthread_cond_clockwait
+.Fa "pthread_cond_t *cond"
+.Fa "pthread_mutex_t *mutex"
+.Fa "clockid_t clockid"
+.Fa "const struct timespec *abstime"
+.Fc
 .Sh DESCRIPTION
 The
 .Fn pthread_cond_timedwait
-function atomically blocks the current thread waiting on the condition
+and
+.Fn pthread_cond_clockwait
+functions atomically blocks the current thread waiting on the condition
 variable specified by
 .Fa cond ,
 and releases the mutex specified by
@@ -59,10 +69,22 @@ time specified in
 and the current thread reacquires the lock on
 .Fa mutex .
 .Pp
-The clock used to measure
+The
+.Fn pthread_cond_clockwait
+function is identical to
+.Fn pthread_cond_timedwait ,
+except in the way the clock to measure time-out is named.
+For the
+.Fn pthread_cond_timedwait
+function, the clock used to measure
 .Fa abstime
 can be specified during creation of the condition variable using
 .Xr pthread_condattr_setclock 3 .
+For the
+.Fn pthread_cond_clockwait
+function, the clock is specified by the
+.Fa clockid
+argument.
 .Sh RETURN VALUES
 If successful, the
 .Fn pthread_cond_timedwait
@@ -101,3 +123,9 @@ The
 .Fn pthread_cond_timedwait
 function conforms to
 .St -p1003.1-96 .
+The
+.Fn pthread_cond_clockwait
+function conforms to
+.St -p1003.1-2024
+and appeared in
+.Fx 16.0 .
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.