diff options
author | Sverker Eriksson <[email protected]> | 2019-02-01 19:10:24 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-02-01 19:10:24 +0100 |
commit | a7f51f7f903525350f0eb33a8751626610369d7b (patch) | |
tree | 82ee8f4189481cfb9d69352da0000fd18b5bc675 /erts/emulator/beam/erl_nif.c | |
parent | 1ea703443fa0bbc3aade0bb61fc96b2f0cf6b84c (diff) | |
download | otp-a7f51f7f903525350f0eb33a8751626610369d7b.tar.gz otp-a7f51f7f903525350f0eb33a8751626610369d7b.tar.bz2 otp-a7f51f7f903525350f0eb33a8751626610369d7b.zip |
erts: Add enif_make_monitor_term
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index a48d0391f6..b762e0f6e7 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -3362,6 +3362,12 @@ int enif_monitor_process(ErlNifEnv* env, void* obj, const ErlNifPid* target_pid, return 0; } +ERL_NIF_TERM enif_make_monitor_term(ErlNifEnv* env, const ErlNifMonitor* monitor) +{ + Eterm* hp = alloc_heap(env, ERTS_REF_THING_SIZE); + return erts_driver_monitor_to_ref(hp, monitor); +} + int enif_demonitor_process(ErlNifEnv* env, void* obj, const ErlNifMonitor* monitor) { ErtsResource* rsrc = DATA_TO_RESOURCE(obj); |