summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2011-01-04 05:35:19 +0000
committerdavidxu <davidxu@FreeBSD.org>2011-01-04 05:35:19 +0000
commitdd12e67260406f8c82aa2357d30772502896777e (patch)
tree59e8f6fb300f61c29194db2aa671df13b6a1470a /lib/libthr
parent9eacf6329030cacff0372eddc8d9416c78f4175f (diff)
downloadFreeBSD-src-dd12e67260406f8c82aa2357d30772502896777e.zip
FreeBSD-src-dd12e67260406f8c82aa2357d30772502896777e.tar.gz
Because sleepqueue may still being used, we should always check wchan with
queue locked.
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/thread/thr_cond.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/libthr/thread/thr_cond.c b/lib/libthr/thread/thr_cond.c
index 6ec6d4c..a834711 100644
--- a/lib/libthr/thread/thr_cond.c
+++ b/lib/libthr/thread/thr_cond.c
@@ -246,11 +246,6 @@ cond_wait_user(struct pthread_cond *cvp, struct pthread_mutex *mp,
error = _thr_sleep(curthread, cvp->__clock_id, abstime);
}
- if (curthread->wchan == NULL) {
- error = 0;
- goto out;
- }
-
_sleepq_lock(cvp);
if (curthread->wchan == NULL) {
error = 0;
@@ -274,7 +269,6 @@ cond_wait_user(struct pthread_cond *cvp, struct pthread_mutex *mp,
}
}
_sleepq_unlock(cvp);
-out:
curthread->mutex_obj = NULL;
_mutex_cv_lock(mp, recurse);
return (error);
OpenPOWER on IntegriCloud