aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2018-12-17 10:59:25 +0100
committerLukas Larsson <[email protected]>2019-02-05 14:40:46 +0100
commit5c8f2bee9a427768c187a35a6ecd720faa860200 (patch)
treea67b975b84f376972900b2650158b5bcc877aad6 /erts/emulator/beam/erl_process.c
parentbcb79fa612454012db31b1404940caea209ffeec (diff)
downloadotp-5c8f2bee9a427768c187a35a6ecd720faa860200.tar.gz
otp-5c8f2bee9a427768c187a35a6ecd720faa860200.tar.bz2
otp-5c8f2bee9a427768c187a35a6ecd720faa860200.zip
erts: Refactor rbt _yielding to use reductions
All of the Red-Black Tree _yielding functions have been updated to work with reductions returned by the called function instead of yielding on each element.
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index c2799f6612..f9cc85b6d7 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -12055,8 +12055,8 @@ erts_set_self_exiting(Process *c_p, Eterm reason)
add2runq(enqueue, enq_prio, c_p, state, NULL);
}
-void
-erts_proc_exit_handle_monitor(ErtsMonitor *mon, void *vctxt)
+int
+erts_proc_exit_handle_monitor(ErtsMonitor *mon, void *vctxt, Sint reds)
{
Process *c_p = ((ErtsProcExitContext *) vctxt)->c_p;
Eterm reason = ((ErtsProcExitContext *) vctxt)->reason;
@@ -12215,10 +12215,11 @@ erts_proc_exit_handle_monitor(ErtsMonitor *mon, void *vctxt)
erts_monitor_release_both(mdp);
else if (mon)
erts_monitor_release(mon);
+ return 1;
}
-void
-erts_proc_exit_handle_link(ErtsLink *lnk, void *vctxt)
+int
+erts_proc_exit_handle_link(ErtsLink *lnk, void *vctxt, Sint reds)
{
Process *c_p = ((ErtsProcExitContext *) vctxt)->c_p;
Eterm reason = ((ErtsProcExitContext *) vctxt)->reason;
@@ -12288,6 +12289,7 @@ erts_proc_exit_handle_link(ErtsLink *lnk, void *vctxt)
erts_link_release_both(ldp);
else if (lnk)
erts_link_release(lnk);
+ return 1;
}
/* this function fishishes a process and propagates exit messages - called