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 --- tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c b/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c index 3e467a1..5ab7e33 100644 --- a/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c +++ b/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c @@ -37,8 +37,8 @@ thread(void *arg) { pthread_mutex_t *mtx = arg; - if (pthread_mutex_islocked_np(mtx) == 0) { - printf("pthread_mutex_islocked_np() returned zero\n" + if (pthread_mutex_islocked_np(mtx) != 0) { + printf("pthread_mutex_islocked_np() returned non-zero\n" "for a mutex held by another thread\n"); exit(1); } -- cgit v1.1