diff options
author | Rickard Green <[email protected]> | 2017-01-18 14:40:25 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-01-18 14:40:25 +0100 |
commit | bfcf88311828b93a833ce96ad1a518b8eca08552 (patch) | |
tree | 0f1a4cd1b6482caec1b0e2ad7661900529124d59 /erts/emulator/beam/erl_nif.c | |
parent | 505305a4b6a6372921808c4e5ec56db51b6a308b (diff) | |
download | otp-bfcf88311828b93a833ce96ad1a518b8eca08552.tar.gz otp-bfcf88311828b93a833ce96ad1a518b8eca08552.tar.bz2 otp-bfcf88311828b93a833ce96ad1a518b8eca08552.zip |
Change exception for enif_schedule_nif() with dirty flags
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index b860759fa2..af3ca3afa3 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -2506,10 +2506,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); |