aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-11-04 20:43:01 +0100
committerRickard Green <[email protected]>2014-11-04 20:43:01 +0100
commit5373d3ac9dd67c0bb593f2d5ed9121d75f27b559 (patch)
tree0aa0cd1e853ec21e2b3b9395bcddebdb25ae14dd
parent461757503e8ecaaeb3ea9b84f5c0dfccd3408694 (diff)
parentc2fd0dadaeccd42585770fa672acde7bdfae3121 (diff)
downloadotp-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
-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 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;
}