aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/sx.9
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2007-11-25 01:55:53 +0000
committerAttilio Rao <attilio@FreeBSD.org>2007-11-25 01:55:53 +0000
commit0e933b2f3cca0ab39fe8c13086b50de8b7a9138a (patch)
treef28fac9732facaadd54de9fc7e0fcc1fbf191b10 /share/man/man9/sx.9
parent6442838d089c4b3e8277b80c0a84969bf5ed1b31 (diff)
Update sx(9) lock manpage in order to add missing prototypes for function
sx_slock_sig() and sx_xlock_sig() and their respective explanation.
Notes
Notes: svn path=/head/; revision=173888
Diffstat (limited to 'share/man/man9/sx.9')
-rw-r--r--share/man/man9/sx.919
1 files changed, 17 insertions, 2 deletions
diff --git a/share/man/man9/sx.9 b/share/man/man9/sx.9
index c6410e415910..fd07b26104f3 100644
--- a/share/man/man9/sx.9
+++ b/share/man/man9/sx.9
@@ -36,6 +36,8 @@
.Nm sx_destroy ,
.Nm sx_slock ,
.Nm sx_xlock ,
+.Nm sx_slock_sig ,
+.Nm sx_xlock_sig ,
.Nm sx_try_slock ,
.Nm sx_try_xlock ,
.Nm sx_sunlock ,
@@ -64,6 +66,10 @@
.Ft void
.Fn sx_xlock "struct sx *sx"
.Ft int
+.Fn sx_slock_sig "struct sx *sx"
+.Ft int
+.Fn sx_xlock_sig "struct sx *sx"
+.Ft int
.Fn sx_try_slock "struct sx *sx"
.Ft int
.Fn sx_try_xlock "struct sx *sx"
@@ -147,7 +153,8 @@ The lock
must not be locked by any thread when it is destroyed.
.Pp
Threads acquire and release a shared lock by calling
-.Fn sx_slock
+.Fn sx_slock ,
+.Fn sx_slock_sig
or
.Fn sx_try_slock
and
@@ -155,7 +162,8 @@ and
or
.Fn sx_unlock .
Threads acquire and release an exclusive lock by calling
-.Fn sx_xlock
+.Fn sx_xlock ,
+.Fn sx_xlock_sig
or
.Fn sx_try_xlock
and
@@ -181,6 +189,13 @@ will return 0 if the shared lock cannot be upgraded to an exclusive lock
immediately; otherwise the exclusive lock will be acquired and a non-zero value
will be returned.
.Pp
+.Fn sx_slock_sig
+and
+.Fn sx_xlock_sig
+do the same as their normal versions but performing an interruptible sleep.
+They return a non-zero value if the sleep has been interrupted by a signal
+or an interrupt, otherwise 0.
+.Pp
A thread can atomically release a shared/exclusive lock while waiting for an
event by calling
.Fn sx_sleep .