Date: Thu, 17 Dec 2009 02:06:07 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r200622 - stable/8/lib/libthr/thread Message-ID: <200912170206.nBH267ma017399@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Thu Dec 17 02:06:07 2009 New Revision: 200622 URL: http://svn.freebsd.org/changeset/base/200622 Log: MFC rev 200498: Work-around a race condition on ia64 while unlocking a contested lock. Modified: stable/8/lib/libthr/thread/thr_umtx.c Directory Properties: stable/8/lib/libthr/ (props changed) Modified: stable/8/lib/libthr/thread/thr_umtx.c ============================================================================== --- stable/8/lib/libthr/thread/thr_umtx.c Thu Dec 17 00:22:56 2009 (r200621) +++ stable/8/lib/libthr/thread/thr_umtx.c Thu Dec 17 02:06:07 2009 (r200622) @@ -112,10 +112,13 @@ __thr_umutex_timedlock(struct umutex *mt int __thr_umutex_unlock(struct umutex *mtx, uint32_t id) { +#ifndef __ia64__ + /* XXX this logic has a race-condition on ia64. */ if ((mtx->m_flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) == 0) { atomic_cmpset_rel_32(&mtx->m_owner, id | UMUTEX_CONTESTED, UMUTEX_CONTESTED); return _umtx_op_err(mtx, UMTX_OP_MUTEX_WAKE, 0, 0, 0); } +#endif /* __ia64__ */ return _umtx_op_err(mtx, UMTX_OP_MUTEX_UNLOCK, 0, 0, 0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912170206.nBH267ma017399>