aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-02-20 17:34:31 +0100
committerSverker Eriksson <[email protected]>2019-02-20 17:34:31 +0100
commitdf63dd115802c9681892054df3bf5044f2f43f11 (patch)
treed77da0885a28589d9c535ffab6288e34d7f4dadf /erts
parent733c12bd6c755bfd585c235e91e4d01c2b03b9b8 (diff)
parentc10cd657148d71c742c129c4a6ec64d22638102e (diff)
downloadotp-df63dd115802c9681892054df3bf5044f2f43f11.tar.gz
otp-df63dd115802c9681892054df3bf5044f2f43f11.tar.bz2
otp-df63dd115802c9681892054df3bf5044f2f43f11.zip
Merge branch 'maint'
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_nif.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 82645d4091..06f3438caf 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -2712,8 +2712,12 @@ int enif_consume_timeslice(ErlNifEnv* env, int percent)
{
Process *proc;
Sint reds;
+ int sched;
- execution_state(env, &proc, NULL);
+ execution_state(env, &proc, &sched);
+
+ if (sched < 0)
+ return 0; /* no-op on dirty scheduler */
ASSERT(is_proc_bound(env) && percent >= 1 && percent <= 100);
if (percent < 1) percent = 1;