Check if thread is in critical region, only testing check_pending
is not enough.
This commit is contained in:
parent
9b5c4b6694
commit
8b258c151d
@ -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 New Issue
Block a user