diff options
author | Bruce Yinhe <[email protected]> | 2014-11-10 09:34:51 +0100 |
---|---|---|
committer | Bruce Yinhe <[email protected]> | 2014-11-10 09:34:51 +0100 |
commit | e25d2283e7607224b94d248ac99ba7a2f3d774c6 (patch) | |
tree | 1dd0631389a3d9ddf72c012699e344ac32a1d4a6 /erts/emulator/test/nif_SUITE_data/nif_SUITE.c | |
parent | 7b803c5fbc69458d3e1dba8a88322c2306f77e44 (diff) | |
parent | 6af3ab986ac6561db52b79fb7a6f646c4314c4e2 (diff) | |
download | otp-e25d2283e7607224b94d248ac99ba7a2f3d774c6.tar.gz otp-e25d2283e7607224b94d248ac99ba7a2f3d774c6.tar.bz2 otp-e25d2283e7607224b94d248ac99ba7a2f3d774c6.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/test/nif_SUITE_data/nif_SUITE.c')
-rw-r--r-- | erts/emulator/test/nif_SUITE_data/nif_SUITE.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c index 291c903947..85544db2ab 100644 --- a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c +++ b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c @@ -1623,6 +1623,18 @@ static ERL_NIF_TERM call_dirty_nif_exception(ErlNifEnv* env, int argc, const ERL call_dirty_nif_exception, argc-1, argv); } } + +static ERL_NIF_TERM call_dirty_nif_zero_args(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{ + int i; + ERL_NIF_TERM result[1000]; + ERL_NIF_TERM ok = enif_make_atom(env, "ok"); + assert(argc == 0); + for (i = 0; i < sizeof(result)/sizeof(*result); i++) { + result[i] = ok; + } + return enif_make_list_from_array(env, result, i); +} #endif static ERL_NIF_TERM is_map_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) @@ -1807,6 +1819,7 @@ static ErlNifFunc nif_funcs[] = {"call_dirty_nif", 3, call_dirty_nif}, {"send_from_dirty_nif", 1, send_from_dirty_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, {"call_dirty_nif_exception", 0, call_dirty_nif_exception, ERL_NIF_DIRTY_JOB_IO_BOUND}, + {"call_dirty_nif_zero_args", 0, call_dirty_nif_zero_args, ERL_NIF_DIRTY_JOB_CPU_BOUND}, #endif {"is_map_nif", 1, is_map_nif}, {"get_map_size_nif", 1, get_map_size_nif}, |