diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-05-02 11:39:00 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-05-02 11:39:00 +0000 |
commit | 10a5205738a1a7ca38cfeccd4fe50740796b5767 (patch) | |
tree | 62de60aa24402508b478dc59350575ad9ed2e05b | |
parent | 78f557b9c890e72abae01c074f97679116fe3bfd (diff) | |
download | FreeBSD-src-10a5205738a1a7ca38cfeccd4fe50740796b5767.zip FreeBSD-src-10a5205738a1a7ca38cfeccd4fe50740796b5767.tar.gz |
Handle thread canceled case, it is same as signal caused backout,
but will break out of loop.
-rw-r--r-- | lib/libkse/thread/thr_cond.c | 2 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_cond.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_cond.c b/lib/libkse/thread/thr_cond.c index 32a152d..12c14db 100644 --- a/lib/libkse/thread/thr_cond.c +++ b/lib/libkse/thread/thr_cond.c @@ -326,7 +326,7 @@ _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) * that the mutex be reaquired prior to * cancellation. */ - if (done != 0) { + if (done || interrupted) { rval = _mutex_cv_lock(mutex); unlock_mutex = 1; } diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c index 32a152d..12c14db 100644 --- a/lib/libpthread/thread/thr_cond.c +++ b/lib/libpthread/thread/thr_cond.c @@ -326,7 +326,7 @@ _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) * that the mutex be reaquired prior to * cancellation. */ - if (done != 0) { + if (done || interrupted) { rval = _mutex_cv_lock(mutex); unlock_mutex = 1; } |