aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-04-11 17:50:10 +0200
committerRickard Green <[email protected]>2017-04-11 17:50:10 +0200
commit53f11c147d7c7a1557e12a7c262c2289d89047aa (patch)
tree7c316f14c5662c41a6069f6b2e6b8accdb58c763 /erts/emulator/beam/erl_process.c
parente2abc143613c83e00c7c2e22721d30fd2f6309a3 (diff)
downloadotp-53f11c147d7c7a1557e12a7c262c2289d89047aa.tar.gz
otp-53f11c147d7c7a1557e12a7c262c2289d89047aa.tar.bz2
otp-53f11c147d7c7a1557e12a7c262c2289d89047aa.zip
Fix multi-scheduling with only one normal scheduler
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 88fae30845..f0fd3e3dc9 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -8515,8 +8515,9 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int normal
p->flags |= have_blckd_flg;
goto wait_until_msb;
}
- else if (msbp->blckrs) {
- ASSERT(msbp->ongoing);
+ else if (msbp->blckrs || (normal && erts_no_schedulers == 1)) {
+ ASSERT(!msbp->blckrs || msbp->ongoing);
+ msbp->ongoing = 1;
plp = proclist_create(p);
erts_proclist_store_last(&msbp->blckrs, plp);
p->flags |= have_blckd_flg;
@@ -8530,7 +8531,7 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int normal
else
res = ERTS_SCHDLR_SSPND_DONE_NMSCHED_BLOCKED;
}
- else {
+ else {
int online = (int) schdlr_sspnd_get_nscheds(&schdlr_sspnd.online,
ERTS_SCHED_NORMAL);
ASSERT(!msbp->ongoing);