diff options
author | Sverker Eriksson <[email protected]> | 2016-01-28 16:27:34 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-01-28 16:27:34 +0100 |
commit | 8be1fad4075eba013a811c6879e3a906f365d3d4 (patch) | |
tree | 300e8a413408f9cea0acfe41e76a4c66ef2d18fb /erts/emulator/beam/erl_bif_ddll.c | |
parent | 042677624b1d7b3f4c99be4e1483180e7fe8b2c0 (diff) | |
parent | 632eb0ee2fbad692255ca2b1d0c3300fd0b6e492 (diff) | |
download | otp-8be1fad4075eba013a811c6879e3a906f365d3d4.tar.gz otp-8be1fad4075eba013a811c6879e3a906f365d3d4.tar.bz2 otp-8be1fad4075eba013a811c6879e3a906f365d3d4.zip |
Merge branch 'master' into sverk/hipe-line-table-bug/master/OTP-13282
Diffstat (limited to 'erts/emulator/beam/erl_bif_ddll.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_ddll.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/erts/emulator/beam/erl_bif_ddll.c b/erts/emulator/beam/erl_bif_ddll.c index 28bec6325c..2b1d875bfe 100644 --- a/erts/emulator/beam/erl_bif_ddll.c +++ b/erts/emulator/beam/erl_bif_ddll.c @@ -1707,18 +1707,19 @@ static void notify_proc(Process *proc, Eterm ref, Eterm driver_name, Eterm type, Eterm mess; Eterm r; Eterm *hp; - ErlHeapFragment *bp; - ErlOffHeap *ohp; + ErtsMessage *mp; ErtsProcLocks rp_locks = 0; + ErlOffHeap *ohp; ERTS_SMP_CHK_NO_PROC_LOCKS; assert_drv_list_rwlocked(); if (errcode != 0) { int need = load_error_need(errcode); Eterm e; - hp = erts_alloc_message_heap(6 /* tuple */ + 3 /* Error tuple */ + - REF_THING_SIZE + need, &bp, &ohp, - proc, &rp_locks); + mp = erts_alloc_message_heap(proc, &rp_locks, + (6 /* tuple */ + 3 /* Error tuple */ + + REF_THING_SIZE + need), + &hp, &ohp); r = copy_ref(ref,hp); hp += REF_THING_SIZE; e = build_load_error_hp(hp, errcode); @@ -1727,12 +1728,14 @@ static void notify_proc(Process *proc, Eterm ref, Eterm driver_name, Eterm type, hp += 3; mess = TUPLE5(hp,type,r,am_driver,driver_name,mess); } else { - hp = erts_alloc_message_heap(6 /* tuple */ + REF_THING_SIZE, &bp, &ohp, proc, &rp_locks); + mp = erts_alloc_message_heap(proc, &rp_locks, + 6 /* tuple */ + REF_THING_SIZE, + &hp, &ohp); r = copy_ref(ref,hp); hp += REF_THING_SIZE; mess = TUPLE5(hp,type,r,am_driver,driver_name,tag); } - erts_queue_message(proc, &rp_locks, bp, mess, am_undefined); + erts_queue_message(proc, &rp_locks, mp, mess, am_undefined); erts_smp_proc_unlock(proc, rp_locks); ERTS_SMP_CHK_NO_PROC_LOCKS; } |