1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

Handle thread canceled case, it is same as signal caused backout,

but will break out of loop.
This commit is contained in:
David Xu 2003-05-02 11:39:00 +00:00
parent 6203d02c6a
commit 99c883294c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114524
2 changed files with 2 additions and 2 deletions

View File

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

View File

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