aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-11-25 19:42:47 +0100
committerRickard Green <[email protected]>2014-11-25 19:42:47 +0100
commitf4dce072bab24674295a90d06786349a252a0891 (patch)
tree1ba90e8bad6d8f08361574ac8f5e0e81badc6cac /erts/emulator/beam
parent26e93069d53a44e274bc7c5f871fa8a7bd1dd94b (diff)
parent5373d3ac9dd67c0bb593f2d5ed9121d75f27b559 (diff)
downloadotp-f4dce072bab24674295a90d06786349a252a0891.tar.gz
otp-f4dce072bab24674295a90d06786349a252a0891.tar.bz2
otp-f4dce072bab24674295a90d06786349a252a0891.zip
Merge branch 'rickard/maint-17/activate-runq/OTP-12287' into maint
* rickard/maint-17/activate-runq/OTP-12287: Do not let non-empty run-queue prevent activation of scheduler
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_process.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index e5bb1203c8..f84677dea4 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -3244,11 +3244,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;
}