aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-03-07 16:18:24 +0100
committerRickard Green <[email protected]>2018-03-07 16:18:24 +0100
commit9ef6b9a923b25ceb487eea4431cdf730972fc489 (patch)
tree07da445103b0ee55c06b9764c9b55655b968a099 /erts/emulator/beam/erl_process.c
parent249549e8102d68ab086c418fa93494906c4445d0 (diff)
downloadotp-9ef6b9a923b25ceb487eea4431cdf730972fc489.tar.gz
otp-9ef6b9a923b25ceb487eea4431cdf730972fc489.tar.bz2
otp-9ef6b9a923b25ceb487eea4431cdf730972fc489.zip
Fix for bug introduced when replacing ERTS_PSFLG_BOUND
Bug introduced in commit fbb10ebc4a37555c7ea7f99e14286d862993976a
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index b19659f496..23fe353495 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -4135,8 +4135,6 @@ evacuate_run_queue(ErtsRunQueue *rq,
for (prio_q = 0; prio_q < ERTS_NO_PROC_PRIO_QUEUES; prio_q++) {
erts_aint32_t state;
Process *proc;
- int notify = 0;
- to_rq = NULL;
if (!mp->prio[prio_q].runq)
return;
@@ -4195,6 +4193,12 @@ evacuate_run_queue(ErtsRunQueue *rq,
goto handle_next_proc;
}
+ prio = (int) ERTS_PSFLGS_GET_PRQ_PRIO(state);
+ to_rq = mp->prio[prio].runq;
+
+ if (!to_rq)
+ goto handle_next_proc;
+
if (!erts_try_change_runq_proc(proc, to_rq)) {
/* Bound processes get stuck here... */
proc->next = NULL;
@@ -4205,15 +4209,13 @@ evacuate_run_queue(ErtsRunQueue *rq,
sbpp->last = proc;
}
else {
- int prio = (int) ERTS_PSFLGS_GET_PRQ_PRIO(state);
erts_runq_unlock(rq);
- to_rq = mp->prio[prio].runq;
-
erts_runq_lock(to_rq);
enqueue_process(to_rq, prio, proc);
erts_runq_unlock(to_rq);
- notify = 1;
+
+ smp_notify_inc_runq(to_rq);
erts_runq_lock(rq);
}
@@ -4221,8 +4223,7 @@ evacuate_run_queue(ErtsRunQueue *rq,
handle_next_proc:
proc = dequeue_process(rq, prio_q, &state);
}
- if (notify)
- smp_notify_inc_runq(to_rq);
+
}
}