The thread suspend function now returns ETIMEDOUT, not EAGAIN.
This commit is contained in:
parent
ece20938e5
commit
0c3a942692
@ -308,10 +308,9 @@ cond_wait_common(pthread_cond_t * cond, pthread_mutex_t * mutex,
|
||||
* before we got a chance to run again. We check for
|
||||
* this by looking to see if our state is RUNNING.
|
||||
*/
|
||||
if (rval == EAGAIN) {
|
||||
if (rval == ETIMEDOUT) {
|
||||
if (curthread->state != PS_RUNNING) {
|
||||
PTHREAD_SET_STATE(curthread, PS_RUNNING);
|
||||
rval = ETIMEDOUT;
|
||||
} else
|
||||
rval = 0;
|
||||
}
|
||||
|
@ -905,7 +905,7 @@ get_mcontested(pthread_mutex_t mutexp, const struct timespec *abstime)
|
||||
PANIC("Cannot suspend on mutex.");
|
||||
_SPINLOCK(&mutexp->lock);
|
||||
_thread_critical_enter(curthread);
|
||||
if (error == EAGAIN) {
|
||||
if (error == ETIMEDOUT) {
|
||||
/*
|
||||
* Between the timeout and when the mutex was
|
||||
* locked the previous owner may have released
|
||||
|
Loading…
Reference in New Issue
Block a user