diff options
author | jhb <jhb@FreeBSD.org> | 2007-05-19 20:24:32 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-05-19 20:24:32 +0000 |
commit | 1b6732031fc3cae49a63f6a721f1eff7283161f5 (patch) | |
tree | 492d2885b124859697af866cebede90378aed26c /share/man/man9/sx.9 | |
parent | 3fb1eb1627b5ab7b81d7e6d42c11fd746a2c3740 (diff) | |
download | FreeBSD-src-1b6732031fc3cae49a63f6a721f1eff7283161f5.zip FreeBSD-src-1b6732031fc3cae49a63f6a721f1eff7283161f5.tar.gz |
Document sx_xholder().
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 8c82f13..68267b6 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. |