mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Tweak _thr_cancel_leave_defer a bit to fix a possible race.
This commit is contained in:
parent
6e4f008cbb
commit
3ce4e91d4e
1 changed files with 7 additions and 3 deletions
|
|
@ -170,9 +170,13 @@ void
|
|||
_thr_cancel_leave_defer(struct pthread *curthread, int check)
|
||||
{
|
||||
if (curthread->cancel_enable) {
|
||||
curthread->cancel_defer--;
|
||||
if (check)
|
||||
if (!check) {
|
||||
curthread->cancel_point--;
|
||||
curthread->cancel_defer--;
|
||||
} else {
|
||||
curthread->cancel_defer--;
|
||||
testcancel(curthread);
|
||||
curthread->cancel_point--;
|
||||
curthread->cancel_point--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue