summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/man/man9/Makefile2
-rw-r--r--share/man/man9/rwlock.920
2 files changed, 21 insertions, 1 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index dd10f7c..3499e70 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -958,7 +958,9 @@ MLINKS+=rwlock.9 rw_assert.9 \
rwlock.9 rw_runlock.9 \
rwlock.9 rw_sleep.9 \
rwlock.9 RW_SYSINIT.9 \
+ rwlock.9 rw_try_rlock.9 \
rwlock.9 rw_try_upgrade.9 \
+ rwlock.9 rw_try_wlock.9 \
rwlock.9 rw_wlock.9 \
rwlock.9 rw_wowned.9 \
rwlock.9 rw_wunlock.9
diff --git a/share/man/man9/rwlock.9 b/share/man/man9/rwlock.9
index 4bc8312..5039a42 100644
--- a/share/man/man9/rwlock.9
+++ b/share/man/man9/rwlock.9
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 16, 2008
+.Dd April 1, 2008
.Dt RWLOCK 9
.Os
.Sh NAME
@@ -37,7 +37,9 @@
.Nm rw_runlock ,
.Nm rw_wunlock ,
.Nm rw_unlock ,
+.Nm rw_try_rlock ,
.Nm rw_try_upgrade ,
+.Nm rw_try_wlock ,
.Nm rw_downgrade ,
.Nm rw_sleep ,
.Nm rw_initialized ,
@@ -59,6 +61,10 @@
.Fn rw_rlock "struct rwlock *rw"
.Ft void
.Fn rw_wlock "struct rwlock *rw"
+.Ft int
+.Fn rw_try_rlock "struct rwlock *rw"
+.Ft int
+.Fn rw_try_wlock "struct rwlock *rw"
.Ft void
.Fn rw_runlock "struct rwlock *rw"
.Ft void
@@ -176,6 +182,18 @@ function can be called recursively only if
has been initialized with the
.Dv RW_RECURSE
option enabled.
+.It Fn rw_try_rlock "struct rwlock *rw"
+Try to lock
+.Fa rw
+as a reader.
+This function will return true if the operation succeeds, otherwise 0
+will be returned.
+.It Fn rw_try_wlock "struct rwlock *rw"
+Try to lock
+.Fa rw
+as a writer.
+This function will return true if the operation succeeds, otherwise 0
+will be returned.
.It Fn rw_runlock "struct rwlock *rw"
This function releases a shared lock previously acquired by
.Fn rw_rlock .
OpenPOWER on IntegriCloud