mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Check if thread is in critical region, only testing check_pending
is not enough.
This commit is contained in:
parent
9b5c4b6694
commit
8b258c151d
2 changed files with 4 additions and 2 deletions
|
|
@ -673,7 +673,8 @@ _thr_sched_switch_unlocked(struct pthread *curthread)
|
|||
/*
|
||||
* This thread is being resumed; check for cancellations.
|
||||
*/
|
||||
if ((psf.psf_valid || curthread->check_pending)) {
|
||||
if ((psf.psf_valid ||
|
||||
(curthread->check_pending && !THR_IN_CRITICAL(curthread)))) {
|
||||
resume_once = 0;
|
||||
THR_GETCONTEXT(&uc);
|
||||
if (resume_once == 0) {
|
||||
|
|
|
|||
|
|
@ -673,7 +673,8 @@ _thr_sched_switch_unlocked(struct pthread *curthread)
|
|||
/*
|
||||
* This thread is being resumed; check for cancellations.
|
||||
*/
|
||||
if ((psf.psf_valid || curthread->check_pending)) {
|
||||
if ((psf.psf_valid ||
|
||||
(curthread->check_pending && !THR_IN_CRITICAL(curthread)))) {
|
||||
resume_once = 0;
|
||||
THR_GETCONTEXT(&uc);
|
||||
if (resume_once == 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue