Date: Sun, 29 May 2016 15:02:56 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300958 - head/lib/libc/sys Message-ID: <201605291502.u4TF2uOm098184@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun May 29 15:02:55 2016 New Revision: 300958 URL: https://svnweb.freebsd.org/changeset/base/300958 Log: _umtx_op(2): Note deprecation of UMTX_OP_MUTEX_WAKE. Modified: head/lib/libc/sys/_umtx_op.2 Modified: head/lib/libc/sys/_umtx_op.2 ============================================================================== --- head/lib/libc/sys/_umtx_op.2 Sun May 29 14:16:23 2016 (r300957) +++ head/lib/libc/sys/_umtx_op.2 Sun May 29 15:02:55 2016 (r300958) @@ -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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605291502.u4TF2uOm098184>