diff options
author | attilio <attilio@FreeBSD.org> | 2007-11-25 01:55:53 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2007-11-25 01:55:53 +0000 |
commit | 9dbbf0c5564233c13511bbea522a9d981ca837b3 (patch) | |
tree | f28fac9732facaadd54de9fc7e0fcc1fbf191b10 /share/man/man9/sx.9 | |
parent | eda62b5e412f63e5a568f3d3a7485605da2647cb (diff) | |
download | FreeBSD-src-9dbbf0c5564233c13511bbea522a9d981ca837b3.zip FreeBSD-src-9dbbf0c5564233c13511bbea522a9d981ca837b3.tar.gz |
Update sx(9) lock manpage in order to add missing prototypes for function
sx_slock_sig() and sx_xlock_sig() and their respective explanation.
Diffstat (limited to 'share/man/man9/sx.9')
-rw-r--r-- | share/man/man9/sx.9 | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/share/man/man9/sx.9 b/share/man/man9/sx.9 index c6410e4..fd07b26 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 . |