aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index afd2ddc69d..8153cdce1c 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -5001,7 +5001,9 @@ schedule_process(Process *p, erts_aint32_t state, int active_enq)
while (1) {
erts_aint32_t e;
n = e = a;
- ASSERT(!(a & ERTS_PSFLG_FREE));
+
+ if (a & ERTS_PSFLG_FREE)
+ return; /* We don't want to schedule free processes... */
n |= ERTS_PSFLG_ACTIVE;
if (!(a & (ERTS_PSFLG_SUSPENDED|ERTS_PSFLG_RUNNING)))
n |= ERTS_PSFLG_IN_RUNQ;
@@ -5012,23 +5014,13 @@ schedule_process(Process *p, erts_aint32_t state, int active_enq)
return; /* Someone else activated process ... */
}
-#ifdef RRR_DEBUG
- if (active_enq)
- erts_fprintf(stderr, "! state=0x%x\n", n);
-#endif
-
if (erts_system_profile_flags.runnable_procs
&& !(a & (ERTS_PSFLG_ACTIVE|ERTS_PSFLG_SUSPENDED))) {
profile_runnable_proc(p, am_active);
}
- if ((n & ERTS_PSFLG_IN_RUNQ) && !(a & ERTS_PSFLG_IN_RUNQ)) {
-#ifdef RRR_DEBUG
- if (active_enq)
- erts_fprintf(stderr, "-->\n");
-#endif
+ if ((n & ERTS_PSFLG_IN_RUNQ) && !(a & ERTS_PSFLG_IN_RUNQ))
add2runq(p, n);
- }
}
void
@@ -5098,9 +5090,6 @@ resume_process(Process *p)
state = erts_smp_atomic32_read_band_mb(&p->state, ~ERTS_PSFLG_SUSPENDED);
state &= ~ERTS_PSFLG_SUSPENDED;
-#ifdef RRR_DEBUG
- erts_fprintf(stderr, "%T - state=0x%x\n", p->id, state);
-#endif
if ((state & (ERTS_PSFLG_EXITING
| ERTS_PSFLG_ACTIVE
| ERTS_PSFLG_IN_RUNQ