summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_mutex.c
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-06-30 12:35:31 +0000
committermtm <mtm@FreeBSD.org>2003-06-30 12:35:31 +0000
commitcd018fba86964f9e9cd0fb8b806a217a5b7e7455 (patch)
treed6ff4b956445f60211778e73d0c4ef152464b4bd /lib/libthr/thread/thr_mutex.c
parent1ef1fa0214a7603fe09c1896407ce34267558f0b (diff)
downloadFreeBSD-src-cd018fba86964f9e9cd0fb8b806a217a5b7e7455.zip
FreeBSD-src-cd018fba86964f9e9cd0fb8b806a217a5b7e7455.tar.gz
Catchup with _thread_suspend() changes.
Diffstat (limited to 'lib/libthr/thread/thr_mutex.c')
-rw-r--r--lib/libthr/thread/thr_mutex.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index 067f0f0..7d7c455 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -1396,6 +1396,8 @@ get_muncontested(pthread_mutex_t mutexp, int nonblock)
static void
get_mcontested(pthread_mutex_t mutexp)
{
+ int error;
+
_thread_critical_enter(curthread);
/*
@@ -1410,7 +1412,9 @@ get_mcontested(pthread_mutex_t mutexp)
curthread->data.mutex = mutexp;
_thread_critical_exit(curthread);
_SPINUNLOCK(&mutexp->lock);
- _thread_suspend(curthread, NULL);
+ error = _thread_suspend(curthread, NULL);
+ if (error != 0 && error != EAGAIN && error != EINTR)
+ PANIC("Cannot suspend on mutex.");
_SPINLOCK(&mutexp->lock);
_thread_critical_enter(curthread);
OpenPOWER on IntegriCloud