diff options
author | des <des@FreeBSD.org> | 2008-02-14 12:37:58 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-02-14 12:37:58 +0000 |
commit | c5334cac084b1e7b3efcf0687be46bd3e05c881c (patch) | |
tree | 885d17a51e9a011d73893a2fe72d6329ce5a37d4 /lib | |
parent | 49aa39283b5da2ce1669bb252c6544ed9383fd5d (diff) | |
download | FreeBSD-src-c5334cac084b1e7b3efcf0687be46bd3e05c881c.zip FreeBSD-src-c5334cac084b1e7b3efcf0687be46bd3e05c881c.tar.gz |
_pthread_mutex_isowned_np(): use a more reliable method; the current code
will work in simple cases, but may fail in more complicated ones.
Reviewed by: davidxu
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libthr/thread/thr_mutex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 0dc9b73..b16cf6e 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -876,5 +876,5 @@ _pthread_mutex_isowned_np(pthread_mutex_t *mutex) if (__predict_false(ret)) return (ret); } - return ((*mutex)->m_lock.m_owner == TID(curthread)); + return ((*mutex)->m_owner == curthread); } |