mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Don't cancel thread if it is in critical region.
This commit is contained in:
parent
0472dafab4
commit
efe33769b9
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue