- Sort functions in the order that rwlock(9) and mutex(9) use.

- Markup sx_unlock() as a function rather than saying it is a macro.
  The macro part is an implementation detail, and all the other sx_*lock()
  functions are actually macros, too.
- Use the same style as rwlock(9) and mutex(9) to markup sx_assert() and
  SX_SYSINIT() with respect to headers and kernel options.
- Add a missing MLINK.
This commit is contained in:
jhb 2007-03-09 16:52:26 +00:00
parent 24c3d87828
commit 83009be85d
2 changed files with 10 additions and 10 deletions

View File

@ -1058,6 +1058,7 @@ MLINKS+=sx.9 sx_assert.9 \
sx.9 sx_try_slock.9 \
sx.9 sx_try_upgrade.9 \
sx.9 sx_try_xlock.9 \
sx.9 sx_unlock.9 \
sx.9 sx_xlock.9 \
sx.9 sx_xlocked.9 \
sx.9 sx_xunlock.9

View File

@ -39,11 +39,11 @@
.Nm sx_try_xlock ,
.Nm sx_sunlock ,
.Nm sx_xunlock ,
.Nm sx_unlock ,
.Nm sx_try_upgrade ,
.Nm sx_downgrade ,
.Nm sx_assert ,
.Nm sx_unlock ,
.Nm sx_xlocked ,
.Nm sx_assert ,
.Nm SX_SYSINIT
.Nd kernel shared/exclusive lock
.Sh SYNOPSIS
@ -66,22 +66,21 @@
.Fn sx_sunlock "struct sx *sx"
.Ft void
.Fn sx_xunlock "struct sx *sx"
.Ft void
.Fn sx_unlock "struct sx *sx"
.Ft int
.Fn sx_try_upgrade "struct sx *sx"
.Ft void
.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"
.Fn SX_SYSINIT "name" "struct sx *sx" "const char *description"
.\"
.Ss Kernel options
.Pp
.Cd "options INVARIANTS"
.Cd "options INVARIANT_SUPPORT"
.Ft void
.Fn sx_assert "struct sx *sx" "int what"
.In sys/kernel.h
.Fn SX_SYSINIT "name" "struct sx *sx" "const char *description"
.Sh DESCRIPTION
Shared/exclusive locks are used to protect data that are read far more often
than they are written.