Document sx_xlocked(9).

Submitted by:	ssouhlal
This commit is contained in:
Pawel Jakub Dawidek 2006-07-12 15:40:35 +00:00
parent b32194a9e9
commit d8e7058159
2 changed files with 9 additions and 1 deletions

View File

@ -1012,7 +1012,8 @@ MLINKS+=sx.9 sx_assert.9 \
sx.9 sx_try_upgrade.9 \
sx.9 sx_try_xlock.9 \
sx.9 sx_xlock.9 \
sx.9 sx_xunlock.9
sx.9 sx_xunlock.9 \
sx.9 sx_xlocked.9
MLINKS+=sysctl_add_oid.9 SYSCTL_ADD_INT.9 \
sysctl_add_oid.9 SYSCTL_ADD_LONG.9 \
sysctl_add_oid.9 SYSCTL_ADD_NODE.9 \

View File

@ -43,6 +43,7 @@
.Nm sx_downgrade ,
.Nm sx_assert ,
.Nm sx_unlock ,
.Nm sx_xlocked ,
.Nm SX_SYSINIT
.Nd kernel shared/exclusive lock
.Sh SYNOPSIS
@ -71,6 +72,8 @@
.Fn sx_downgrade "struct sx *sx"
.Ft void
.Fn sx_assert "struct sx *sx" "int what"
.Ft int
.Fn sx_xlocked "struct sx *sx"
.\"
.Ss Nm Ss utility macros
.Fn sx_unlock "struct sx *sx"
@ -166,6 +169,10 @@ lock pointed to
by the first argument.
.El
.Pp
.Fn sx_xlocked
will return non-zero if the current process holds the exclusive lock;
otherwise, it will return zero.
.Pp
For ease of programming,
.Fn sx_unlock
is provided as a macro frontend to the respective functions,