Because sleepqueue may still being used, we should always check wchan with

queue locked.
This commit is contained in:
davidxu 2011-01-04 05:35:19 +00:00
parent 9eacf63290
commit dd12e67260

View File

@ -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);