summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-02-14 12:37:58 +0000
committerdes <des@FreeBSD.org>2008-02-14 12:37:58 +0000
commitc5334cac084b1e7b3efcf0687be46bd3e05c881c (patch)
tree885d17a51e9a011d73893a2fe72d6329ce5a37d4 /lib/libthr
parent49aa39283b5da2ce1669bb252c6544ed9383fd5d (diff)
downloadFreeBSD-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/libthr')
-rw-r--r--lib/libthr/thread/thr_mutex.c2
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);
}
OpenPOWER on IntegriCloud