diff options
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/Makefile | 3 | ||||
-rw-r--r-- | share/man/man9/sx.9 | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index e4e6061..95e83d4 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -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 \ diff --git a/share/man/man9/sx.9 b/share/man/man9/sx.9 index d89c186..5a60fd1 100644 --- a/share/man/man9/sx.9 +++ b/share/man/man9/sx.9 @@ -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, |