svn commit: r215167 - user/davidxu/libthr/lib/libthr/thread
David Xu
davidxu at FreeBSD.org
Fri Nov 12 07:34:52 UTC 2010
Author: davidxu
Date: Fri Nov 12 07:34:52 2010
New Revision: 215167
URL: http://svn.freebsd.org/changeset/base/215167
Log:
In pthread_mutex_trylock, if the mutex is priority-protect or robust,
always enters kernel to lock the mutex.
Modified:
user/davidxu/libthr/lib/libthr/thread/thr_mutex.c
Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c
==============================================================================
--- user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Fri Nov 12 06:41:55 2010 (r215166)
+++ user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Fri Nov 12 07:34:52 2010 (r215167)
@@ -222,8 +222,6 @@ mutex_trylock_common(struct pthread_mute
TID(curthread))
return mutex_self_trylock(mp);
}
- if ((mp->__lockword & UMUTEX_OWNER_MASK) != 0)
- return (EBUSY);
error = __thr_umutex_trylock((struct umutex *)&mp->__lockword);
if (error == 0 || error == EOWNERDEAD)
enqueue_mutex(curthread, mp);
More information about the svn-src-user
mailing list