aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-11-04 18:00:15 +0100
committerRickard Green <[email protected]>2014-11-04 20:37:36 +0100
commitc2fd0dadaeccd42585770fa672acde7bdfae3121 (patch)
tree18ac83ebe78b95e33fe39806886bca70bcaca1ae /erts
parent23790daf1a2d384b0fc11c655fa825151d9fa420 (diff)
downloadotp-c2fd0dadaeccd42585770fa672acde7bdfae3121.tar.gz
otp-c2fd0dadaeccd42585770fa672acde7bdfae3121.tar.bz2
otp-c2fd0dadaeccd42585770fa672acde7bdfae3121.zip
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.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 1efd070afd..ef59fa8ae0 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -2692,11 +2692,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, 0);
return 1;
}