summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-02-04 12:35:23 +0000
committerdes <des@FreeBSD.org>2008-02-04 12:35:23 +0000
commitc0895348917c86668b5cc15d7e8d98f97043de7e (patch)
treebcaf2a924f9ede8fd58d1456cc860a7f9ad93303 /lib/libthr
parentf23198af5c5d671548e3ad76cf9a569dbc55bd0d (diff)
downloadFreeBSD-src-c0895348917c86668b5cc15d7e8d98f97043de7e.zip
FreeBSD-src-c0895348917c86668b5cc15d7e8d98f97043de7e.tar.gz
After careful consideration (and a brief discussion with attilio@), change
the semantics of pthread_mutex_islocked_np() to return true if and only if the mutex is held by the current thread. Obviously, change the regression test to match. MFC after: 2 weeks
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 032f2e3..9b6c21b 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -877,5 +877,5 @@ _pthread_mutex_islocked_np(pthread_mutex_t *mutex)
if (__predict_false(ret))
return (ret);
}
- return ((*mutex)->m_qe.tqe_prev != NULL);
+ return ((*mutex)->m_lock.m_owner == TID(curthread));
}
OpenPOWER on IntegriCloud