summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2004-03-29 09:35:07 +0000
committermtm <mtm@FreeBSD.org>2004-03-29 09:35:07 +0000
commitf48b8920dc0bd8c3bd93ff83eadb52b48433f641 (patch)
tree3f3123f9c8648b0fe6ad20a0837c61ecb2b423de /lib/libthr
parentb1d34c67437d6699de50766b885705e8ed7f934b (diff)
downloadFreeBSD-src-f48b8920dc0bd8c3bd93ff83eadb52b48433f641.zip
FreeBSD-src-f48b8920dc0bd8c3bd93ff83eadb52b48433f641.tar.gz
The thread suspend function now returns ETIMEDOUT, not EAGAIN.
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/thread/thr_cond.c3
-rw-r--r--lib/libthr/thread/thr_mutex.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_cond.c b/lib/libthr/thread/thr_cond.c
index e7e91d9..9292669 100644
--- a/lib/libthr/thread/thr_cond.c
+++ b/lib/libthr/thread/thr_cond.c
@@ -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;
}
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index 75d7323..94c6c25 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -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
OpenPOWER on IntegriCloud