aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMike Makonnen <mtm@FreeBSD.org>2003-12-30 08:44:55 +0000
committerMike Makonnen <mtm@FreeBSD.org>2003-12-30 08:44:55 +0000
commit2aa9de1f7720a241fc6f7c2debda834e3bea4a9d (patch)
treec494713f2d572e1958d88dfaaa98a84ff1673426 /share
parent2b33fc6470f5a93ffb2caf6316f01ea0f5aa089b (diff)
downloadsrc-2aa9de1f7720a241fc6f7c2debda834e3bea4a9d.tar.gz
src-2aa9de1f7720a241fc6f7c2debda834e3bea4a9d.zip
o Implement pthread_mutex_timedlock(), which does not block indefinitely on
a mutex locked by another thread. o document it: pthread_mutex_timedlock(3)
Notes
Notes: svn path=/head/; revision=123987
Diffstat (limited to 'share')
-rw-r--r--share/man/man3/Makefile5
-rw-r--r--share/man/man3/pthread.35
2 files changed, 10 insertions, 0 deletions
diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile
index bea9924fc677..eb3b5833b418 100644
--- a/share/man/man3/Makefile
+++ b/share/man/man3/Makefile
@@ -3,6 +3,11 @@
MAN= assert.3 bitstring.3 end.3 fpgetround.3 intro.3 pthread.3 queue.3 \
stdarg.3 sysexits.3 timeradd.3 tree.3
+
+.ifndef NOLIBC_R || NOLIBPTHREAD || NOLIBTHR
+MAN+= pthread_mutex_timedlock.3
+.endif
+
MLINKS+=bitstring.3 bit_alloc.3 bitstring.3 bit_clear.3 \
bitstring.3 bit_decl.3 bitstring.3 bit_ffc.3 bitstring.3 bit_ffs.3 \
bitstring.3 bit_nclear.3 bitstring.3 bit_nset.3 bitstring.3 bit_set.3 \
diff --git a/share/man/man3/pthread.3 b/share/man/man3/pthread.3
index 7a8abcf5ba55..459298356a85 100644
--- a/share/man/man3/pthread.3
+++ b/share/man/man3/pthread.3
@@ -274,6 +274,11 @@ 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"
+.Xc
+Lock a mutex and block until it becomes available or until the timeout expires.
+.It Xo
+.Ft int
.Fn pthread_mutex_trylock "pthread_mutex_t *mutex"
.Xc
Try to lock a mutex, but don't block if the mutex is locked by another thread,