diff options
author | Rickard Green <[email protected]> | 2014-08-28 21:28:45 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2014-08-28 21:28:45 +0200 |
commit | feb45017da36be78d4c5784d758ede619fa7bfd3 (patch) | |
tree | 52eb75973ad04d51b7f584a50e2efd7cc8722e82 /erts/emulator/beam/erl_gc.c | |
parent | e71d52daa322f7a1f8992c0775183fce9b7309ba (diff) | |
parent | e167bca85a86cc7a149d53da5cdd08b0905e71a6 (diff) | |
download | otp-feb45017da36be78d4c5784d758ede619fa7bfd3.tar.gz otp-feb45017da36be78d4c5784d758ede619fa7bfd3.tar.bz2 otp-feb45017da36be78d4c5784d758ede619fa7bfd3.zip |
Merge branch 'vinoski/enif-schedule-nif' into maint
* vinoski/enif-schedule-nif:
add enif_schedule_nif() to NIF API
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index aa15d2cc57..0db42d4325 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -2018,6 +2018,20 @@ setup_rootset(Process *p, Eterm *objv, int nobj, Rootset *rootset) roots[n].sz = 1; n++; } + + /* + * If a NIF has saved arguments, they need to be added + */ + if (ERTS_PROC_GET_NIF_TRAP_EXPORT(p)) { + Eterm* argv; + int argc; + if (erts_setup_nif_gc(p, &argv, &argc)) { + roots[n].v = argv; + roots[n].sz = argc; + n++; + } + } + ASSERT(n <= rootset->size); mp = p->msg.first; |