From 3f57a7735572a6d30f488e70c385e5b0275dbdc3 Mon Sep 17 00:00:00 2001 From: davidxu Date: Tue, 9 Dec 2003 00:52:28 +0000 Subject: More reliably check timeout for pthread_mutex_timedlock. --- lib/libpthread/thread/thr_mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libpthread') diff --git a/lib/libpthread/thread/thr_mutex.c b/lib/libpthread/thread/thr_mutex.c index 017baeb..464bc39 100644 --- a/lib/libpthread/thread/thr_mutex.c +++ b/lib/libpthread/thread/thr_mutex.c @@ -752,7 +752,7 @@ mutex_lock_common(struct pthread *curthread, pthread_mutex_t *m, } while (((*m)->m_owner != curthread) && (ret == 0) && (curthread->interrupted == 0) && (curthread->timeout == 0)); - if (ret == 0 && curthread->timeout) + if (ret == 0 && (*m)->m_owner != curthread && curthread->timeout) ret = ETIMEDOUT; /* -- cgit v1.1