Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jul 2026 16:17:59 +0000
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e7015a3834ab - main - pthread_cond_timedwait.3: document pthread_cond_clockwait(3)
Message-ID:  <6a6784b7.1d92f.57382f92@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by kib:

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

commit e7015a3834abe0956e9a8ec6ec4b8e75ea7d71ab
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-07-25 23:56:03 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
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 .


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a6784b7.1d92f.57382f92>