aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/_umtx_op.2
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2016-05-29 15:02:55 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2016-05-29 15:02:55 +0000
commit764be64b12bb543704b35f3d178324bcf48db310 (patch)
tree9dae31ef46c3b120651e84b646e5e6721695d396 /lib/libc/sys/_umtx_op.2
parent8e44e0ab19715e2635c0e8571b51af773c97f1b8 (diff)
downloadsrc-764be64b12bb543704b35f3d178324bcf48db310.tar.gz
src-764be64b12bb543704b35f3d178324bcf48db310.zip
_umtx_op(2): Note deprecation of UMTX_OP_MUTEX_WAKE.
Notes
Notes: svn path=/head/; revision=300958
Diffstat (limited to 'lib/libc/sys/_umtx_op.2')
-rw-r--r--lib/libc/sys/_umtx_op.216
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/libc/sys/_umtx_op.2 b/lib/libc/sys/_umtx_op.2
index 0c8025aa3f67..bd4ad3be770f 100644
--- a/lib/libc/sys/_umtx_op.2
+++ b/lib/libc/sys/_umtx_op.2
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 17, 2016
+.Dd May 29, 2016
.Dt _UMTX_OP 2
.Os
.Sh NAME
@@ -1041,6 +1041,20 @@ with the byte addressed by the
if any.
Only normal mutexes are supported by the request.
The sleep queue is always one for a normal mutex type.
+.Pp
+This request is deprecated in favor of
+.Dv UMTX_OP_MUTEX_WAKE2
+since mutexes using it cannot synchronize their own destruction.
+That is, the
+.Dv m_owner
+word has already been set to
+.Dv UMUTEX_UNOWNED
+when this request is made,
+so that another thread can lock, unlock and destroy the mutex
+(if no other thread uses the mutex afterwards).
+Clearing the
+.Dv UMUTEX_CONTESTED
+bit may then modify freed memory.
.It Dv UMTX_OP_MUTEX_WAKE2
Check if a umutex is unlocked and wake up a waiter.
The arguments for the request are: