mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
Tweak _thr_cancel_leave_defer a bit to fix a possible race.
This commit is contained in:
parent
6e4f008cbb
commit
3ce4e91d4e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164896
@ -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 New Issue
Block a user