summaryrefslogtreecommitdiffstats
path: root/share/man/man9/mutex.9
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-30 22:59:02 +0000
committerjhb <jhb@FreeBSD.org>2001-03-30 22:59:02 +0000
commit8df5fee25b3cf915e2a8f03d434a19e544950a8e (patch)
tree37c9f33aaba5239816fd4e87af9a1aad00e6e894 /share/man/man9/mutex.9
parent52dacf6017c735cbd0c58996f0e677f1332ec7df (diff)
downloadFreeBSD-src-8df5fee25b3cf915e2a8f03d434a19e544950a8e.zip
FreeBSD-src-8df5fee25b3cf915e2a8f03d434a19e544950a8e.tar.gz
- Document mtx_initialized().
- Document that MTX_QUIET can be passed to mtx_init() and the new flag MTX_NOWITNESS.
Diffstat (limited to 'share/man/man9/mutex.9')
-rw-r--r--share/man/man9/mutex.925
1 files changed, 18 insertions, 7 deletions
diff --git a/share/man/man9/mutex.9 b/share/man/man9/mutex.9
index 571f82e..d5f989f 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
OpenPOWER on IntegriCloud