summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_cond.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libkse/thread/thr_cond.c')
-rw-r--r--lib/libkse/thread/thr_cond.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/libkse/thread/thr_cond.c b/lib/libkse/thread/thr_cond.c
index d236607..78ee042 100644
--- a/lib/libkse/thread/thr_cond.c
+++ b/lib/libkse/thread/thr_cond.c
@@ -282,8 +282,11 @@ pthread_cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex)
break;
}
- if (interrupted != 0 && _thread_run->continuation != NULL)
- _thread_run->continuation((void *) _thread_run);
+ if (interrupted != 0) {
+ if (_thread_run->continuation != NULL)
+ _thread_run->continuation((void *) _thread_run);
+ rval = EINTR;
+ }
_thread_leave_cancellation_point();
}
@@ -449,8 +452,11 @@ pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex,
break;
}
- if (interrupted != 0 && _thread_run->continuation != NULL)
- _thread_run->continuation((void *) _thread_run);
+ if (interrupted != 0) {
+ if (_thread_run->continuation != NULL)
+ _thread_run->continuation((void *) _thread_run);
+ rval = EINTR;
+ }
_thread_leave_cancellation_point();
}
OpenPOWER on IntegriCloud