diff options
author | Rickard Green <[email protected]> | 2014-11-04 20:43:01 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2014-11-04 20:43:01 +0100 |
commit | 5373d3ac9dd67c0bb593f2d5ed9121d75f27b559 (patch) | |
tree | 0aa0cd1e853ec21e2b3b9395bcddebdb25ae14dd /erts | |
parent | 461757503e8ecaaeb3ea9b84f5c0dfccd3408694 (diff) | |
parent | c2fd0dadaeccd42585770fa672acde7bdfae3121 (diff) | |
download | otp-5373d3ac9dd67c0bb593f2d5ed9121d75f27b559.tar.gz otp-5373d3ac9dd67c0bb593f2d5ed9121d75f27b559.tar.bz2 otp-5373d3ac9dd67c0bb593f2d5ed9121d75f27b559.zip |
Merge branch 'rickard/activate-runq/OTP-12287' into rickard/maint-17/activate-runq/OTP-12287
* rickard/activate-runq/OTP-12287:
Do not let non-empty run-queue prevent activation of scheduler
Conflicts:
erts/emulator/beam/erl_process.c
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 20a88ec581..7b08e1773a 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -3220,11 +3220,11 @@ chk_wake_sched(ErtsRunQueue *crq, int ix, int activate) return 0; wrq = ERTS_RUNQ_IX(ix); flags = ERTS_RUNQ_FLGS_GET(wrq); + if (activate && !(flags & ERTS_RUNQ_FLG_SUSPENDED)) { + if (try_inc_no_active_runqs(ix+1)) + (void) ERTS_RUNQ_FLGS_UNSET(wrq, ERTS_RUNQ_FLG_INACTIVE); + } if (!(flags & (ERTS_RUNQ_FLG_SUSPENDED|ERTS_RUNQ_FLG_NONEMPTY))) { - if (activate) { - if (try_inc_no_active_runqs(ix+1)) - (void) ERTS_RUNQ_FLGS_UNSET(wrq, ERTS_RUNQ_FLG_INACTIVE); - } wake_scheduler(wrq); return 1; } |