diff options
author | arr <arr@FreeBSD.org> | 2002-04-02 17:21:00 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2002-04-02 17:21:00 +0000 |
commit | 85f5ae7a3be5ba48dbb5746bdd55b5f3c6c91128 (patch) | |
tree | 1bcd5fa5a884cb73126c2ac5737fdb99b2858d9b /share/man/man9/sx.9 | |
parent | 448edc64b41e8d0220c4eaa170ff10164700ec44 (diff) | |
download | FreeBSD-src-85f5ae7a3be5ba48dbb5746bdd55b5f3c6c91128.zip FreeBSD-src-85f5ae7a3be5ba48dbb5746bdd55b5f3c6c91128.tar.gz |
- Add notes about SX_SYSINIT and MTX_SYSINIT in order to document the
recent additions of these macros.
- Add in a MLINK to create SX_SYSINIT.9 and MTX_SYSINIT.9.
Diffstat (limited to 'share/man/man9/sx.9')
-rw-r--r-- | share/man/man9/sx.9 | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/share/man/man9/sx.9 b/share/man/man9/sx.9 index bb634d0..7bb5f12 100644 --- a/share/man/man9/sx.9 +++ b/share/man/man9/sx.9 @@ -41,7 +41,8 @@ .Nm sx_xunlock , .Nm sx_try_upgrade , .Nm sx_downgrade , -.Nm sx_assert +.Nm sx_assert, +.Nm SX_SYSINIT .Nd kernel shared/exclusive lock .Sh SYNOPSIS .In sys/param.h @@ -70,6 +71,7 @@ .Fn sx_downgrade "struct sx *sx" .Ft void .Fn sx_assert "struct sx *sx" "int what" +.Fn SX_SYSINIT "name" "sx" "description" .Sh DESCRIPTION Shared/exclusive locks are used to protect data that are read far more often than they are written. @@ -106,7 +108,7 @@ lock by calling A thread that owns an exclusive lock can downgrade it to a shared lock by calling .Fn sx_downgrade . -.Pp +.PP .Fn sx_try_slock and .Fn sx_try_xlock @@ -124,6 +126,17 @@ The function tests specified conditions and panics if they are not met and the kernel is compiled with .Dv INVARIANTS . +.Pp +The +.Fn SX_SYSINIT +macro is used to generate a call to the +.Fn sx_sysinit +routine at system startup in order to initialize a given sx lock. The parameters are the same as +.Fn sx_init +but with an additional argument, +.Fa name, +that is used in generating unique variable names for the related structures associated with the lock and the sysinit routine. +.Pp The following assertions are supported: .Bl -tag -width ".Dv SX_XLOCKED" .It Dv SX_LOCKED |