aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-25 15:13:30 +0100
committerRickard Green <[email protected]>2017-01-25 15:13:30 +0100
commit7ac0749866500a4de95a00492df31127df78c2be (patch)
tree9f65771d3af287eaef101cd86153478af46c67ab /erts/emulator/beam/erl_nif.c
parent407ed6d3b1f9747b854b2a7ee0cf50bc689ebb8c (diff)
parenteaecd838ebc3410efcbe0f3b1717543d6a4650b0 (diff)
downloadotp-7ac0749866500a4de95a00492df31127df78c2be.tar.gz
otp-7ac0749866500a4de95a00492df31127df78c2be.tar.bz2
otp-7ac0749866500a4de95a00492df31127df78c2be.zip
Merge branch 'rickard/ds-20-fix'
* rickard/ds-20-fix: Fix unused warning Change exception for enif_schedule_nif() with dirty flags Remove double check of NifExport when checking process code
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 47b5b23614..7c7a32f234 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -2538,10 +2538,13 @@ enif_schedule_nif(ErlNifEnv* env, const char* fun_name, int flags,
if (flags == 0)
result = schedule(env, execute_nif, fp, proc->current->module,
fun_name_atom, argc, argv);
+ else if (!(flags & ~(ERL_NIF_DIRTY_JOB_IO_BOUND|ERL_NIF_DIRTY_JOB_CPU_BOUND))) {
#ifdef ERTS_DIRTY_SCHEDULERS
- else if (!(flags & ~(ERL_NIF_DIRTY_JOB_IO_BOUND|ERL_NIF_DIRTY_JOB_CPU_BOUND)))
result = schedule_dirty_nif(env, flags, fp, fun_name_atom, argc, argv);
+#else
+ result = enif_raise_exception(env, am_notsup);
#endif
+ }
else
result = enif_make_badarg(env);