diff options
author | John Baldwin <jhb@FreeBSD.org> | 2001-03-30 22:59:02 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2001-03-30 22:59:02 +0000 |
commit | 0630abadd1234eaf1960a7d9e7133633a7d6b297 (patch) | |
tree | 9ae627cf7e2fbe9e9aaeb991e545bb80bfa93f03 /share | |
parent | bb193d2a6bd0b6f862e90462318a5b619bc801b2 (diff) | |
download | src-0630abadd1234eaf1960a7d9e7133633a7d6b297.tar.gz src-0630abadd1234eaf1960a7d9e7133633a7d6b297.zip |
- Document mtx_initialized().
- Document that MTX_QUIET can be passed to mtx_init() and the new flag
MTX_NOWITNESS.
Notes
Notes:
svn path=/head/; revision=75027
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/mutex.9 | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/share/man/man9/mutex.9 b/share/man/man9/mutex.9 index 571f82eced6f..d5f989ff3757 100644 --- a/share/man/man9/mutex.9 +++ b/share/man/man9/mutex.9 @@ -45,6 +45,7 @@ .Nm mtx_unlock_flags , .Nm mtx_unlock_spin_flags , .Nm mtx_destroy , +.Nm mtx_initialized , .Nm mtx_owned , .Nm mtx_recursed , .Nm mtx_assert @@ -78,6 +79,8 @@ .Ft void .Fn mtx_destroy "struct mtx *mutex" .Ft int +.Fn mtx_initialized "struct mtx *mutex" +.Ft int .Fn mtx_owned "struct mtx *mutex" .Ft int .Fn mtx_recursed "struct mtx *mutex" @@ -307,6 +310,12 @@ or have another process blocked on the mutex when it is destroyed. .Pp The +.Fn mtx_initialized +function returns non-zero if +.Fa mutex +has been initialized and zero otherwise. +.Pp +The .Fn mtx_owned function returns non-zero if the current process holds @@ -387,7 +396,7 @@ argument of .Fn mtx_init specify the mutex type. The possibilities are: -.Bl -tag -width MTX_RECURSE +.Bl -tag -width MTX_NOWITNESS .It Dv MTX_DEF Default lock type; will always allow the current thread to be suspended @@ -406,11 +415,12 @@ while any spin lock is held. Recursion option bit; specifies that the initialized mutex is allowed to recurse. This bit must be present if the mutex is going to be permitted to recurse. -It must always be accompanied by either -.Dv MTX_DEF -or -.Dv MTX_SPIN -but not both. +.It Dv MTX_QUIET +Do not log any mutex operations for this lock. +.It Dv MTX_NOWITNESS +Instruct +.Xr witness 4 +to ignore this lock. .El .Ss Lock and Unlock Flags The flags passed to the @@ -448,7 +458,8 @@ This flag is used internally by the lock code. It should not be used in general kernel code and is documented here for completeness only. .It Dv MTX_QUIET -This option is used to quiet logging messages during mutex operations. +This option is used to quiet logging messages during individual mutex +operations. This can be used to trim superfluous logging messages for debugging purposes. .El .Sh HISTORY |