diff options
author | John Baldwin <jhb@FreeBSD.org> | 2007-05-19 20:24:32 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2007-05-19 20:24:32 +0000 |
commit | 2b9573af36b4fe80678a57fd263b435d09645e89 (patch) | |
tree | 492d2885b124859697af866cebede90378aed26c /share/man/man9/sx.9 | |
parent | 71a95881d4bee6c5f9667999945a336ce5b10375 (diff) |
Notes
Diffstat (limited to 'share/man/man9/sx.9')
-rw-r--r-- | share/man/man9/sx.9 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/share/man/man9/sx.9 b/share/man/man9/sx.9 index 8c82f1377aa1e..68267b6c75415 100644 --- a/share/man/man9/sx.9 +++ b/share/man/man9/sx.9 @@ -44,6 +44,7 @@ .Nm sx_try_upgrade , .Nm sx_downgrade , .Nm sx_sleep , +.Nm sx_xholder , .Nm sx_xlocked , .Nm sx_assert , .Nm SX_SYSINIT @@ -78,6 +79,8 @@ .Fn sx_downgrade "struct sx *sx" .Ft int .Fn sx_sleep "void *chan" "struct sx *sx" "int priority" "const char *wmesg" "int timo" +.Ft "struct thread *" +.Fn sx_xholder "struct sx *sx" .Ft int .Fn sx_xlocked "struct sx *sx" .Pp @@ -235,6 +238,15 @@ Assert that the current thread does not have a recursed lock on .Fa sx . .El .Pp +.Fn sx_xholder +will return a pointer to the thread which currently holds an exclusive lock on +.Fa sx . +If no thread holds an exclusive lock on +.Fa sx , +then +.Dv NULL +is returned instead. +.Pp .Fn sx_xlocked will return non-zero if the current thread holds the exclusive lock; otherwise, it will return zero. |