svn commit: r216949 - head/lib/libthr/thread
David Xu
davidxu at FreeBSD.org
Tue Jan 4 05:35:20 UTC 2011
Author: davidxu
Date: Tue Jan 4 05:35:19 2011
New Revision: 216949
URL: http://svn.freebsd.org/changeset/base/216949
Log:
Because sleepqueue may still being used, we should always check wchan with
queue locked.
Modified:
head/lib/libthr/thread/thr_cond.c
Modified: head/lib/libthr/thread/thr_cond.c
==============================================================================
--- head/lib/libthr/thread/thr_cond.c Tue Jan 4 02:52:22 2011 (r216948)
+++ head/lib/libthr/thread/thr_cond.c Tue Jan 4 05:35:19 2011 (r216949)
@@ -246,11 +246,6 @@ cond_wait_user(struct pthread_cond *cvp,
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,
}
}
_sleepq_unlock(cvp);
-out:
curthread->mutex_obj = NULL;
_mutex_cv_lock(mp, recurse);
return (error);
More information about the svn-src-head
mailing list