From c0895348917c86668b5cc15d7e8d98f97043de7e Mon Sep 17 00:00:00 2001 From: des Date: Mon, 4 Feb 2008 12:35:23 +0000 Subject: 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 --- lib/libthr/thread/thr_mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libthr') 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)); } -- cgit v1.1