Don't cancel thread if it is in critical region.
This commit is contained in:
parent
0472dafab4
commit
efe33769b9
@ -77,7 +77,7 @@ testcancel(struct pthread *curthread)
|
||||
int newval;
|
||||
|
||||
newval = curthread->cancelflags;
|
||||
if (SHOULD_CANCEL(newval))
|
||||
if (SHOULD_CANCEL(newval) && !THR_IN_CRITICAL(curthread))
|
||||
pthread_exit(PTHREAD_CANCELED);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user