diff options
author | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
commit | 84adefa331c4159d432d22840663c38f155cd4c1 (patch) | |
tree | bff9a9c66adda4df2106dfd0e5c053ab182a12bd /erts/emulator/test/trace_nif_SUITE_data | |
download | otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2 otp-84adefa331c4159d432d22840663c38f155cd4c1.zip |
The R13B03 release.OTP_R13B03
Diffstat (limited to 'erts/emulator/test/trace_nif_SUITE_data')
-rw-r--r-- | erts/emulator/test/trace_nif_SUITE_data/Makefile.src | 7 | ||||
-rw-r--r-- | erts/emulator/test/trace_nif_SUITE_data/trace_nif.c | 46 |
2 files changed, 53 insertions, 0 deletions
diff --git a/erts/emulator/test/trace_nif_SUITE_data/Makefile.src b/erts/emulator/test/trace_nif_SUITE_data/Makefile.src new file mode 100644 index 0000000000..26b1b58f70 --- /dev/null +++ b/erts/emulator/test/trace_nif_SUITE_data/Makefile.src @@ -0,0 +1,7 @@ + +NIF_LIBS = trace_nif@dll@ + +all: $(NIF_LIBS) + +@SHLIB_RULES@ + diff --git a/erts/emulator/test/trace_nif_SUITE_data/trace_nif.c b/erts/emulator/test/trace_nif_SUITE_data/trace_nif.c new file mode 100644 index 0000000000..732f1010ae --- /dev/null +++ b/erts/emulator/test/trace_nif_SUITE_data/trace_nif.c @@ -0,0 +1,46 @@ +#include "erl_nif.h" + + +static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) +{ + return 0; +} + +static int reload(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) +{ + return 0; +} + +static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info) +{ + return 0; +} + +static void unload(ErlNifEnv* env, void* priv_data) +{ +} + +static ERL_NIF_TERM nif_0(ErlNifEnv* env) +{ + return enif_make_tuple(env,2, + enif_make_atom(env,"ok"), + enif_make_list(env,0)); +} + +static ERL_NIF_TERM nif_1(ErlNifEnv* env, ERL_NIF_TERM a1) +{ + return enif_make_tuple(env,2, + enif_make_atom(env,"ok"), + enif_make_list(env,1,a1)); +} + + + +static ErlNifFunc nif_funcs[] = +{ + {"nif", 0, nif_0}, + {"nif", 1, nif_1} +}; + +ERL_NIF_INIT(trace_nif_SUITE,nif_funcs,load,reload,upgrade,unload) + |