aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/bif.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2018-12-20 10:18:36 +0100
committerLukas Larsson <[email protected]>2018-12-20 10:18:36 +0100
commitc70717d44859068cd9f8085b9aeb6956ab98bcc0 (patch)
tree756a3719f7800922e148b5d29da78114a81d9401 /erts/emulator/beam/bif.c
parent12d4c5b8ec6310952ee5e72c4a07b5d6bb2bf724 (diff)
parentd27a7569a73480c8c800888923a0cdb7cb29356f (diff)
downloadotp-c70717d44859068cd9f8085b9aeb6956ab98bcc0.tar.gz
otp-c70717d44859068cd9f8085b9aeb6956ab98bcc0.tar.bz2
otp-c70717d44859068cd9f8085b9aeb6956ab98bcc0.zip
Merge branch 'maint'
Conflicts: erts/preloaded/ebin/atomics.beam erts/preloaded/ebin/counters.beam erts/preloaded/ebin/erl_prim_loader.beam erts/preloaded/ebin/erl_tracer.beam erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_code_purger.beam erts/preloaded/ebin/erts_dirty_process_signal_handler.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/erts_literal_area_collector.beam erts/preloaded/ebin/init.beam erts/preloaded/ebin/otp_ring0.beam erts/preloaded/ebin/persistent_term.beam erts/preloaded/ebin/prim_buffer.beam erts/preloaded/ebin/prim_eval.beam erts/preloaded/ebin/prim_file.beam erts/preloaded/ebin/prim_inet.beam erts/preloaded/ebin/prim_zip.beam erts/preloaded/ebin/zlib.beam
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r--erts/emulator/beam/bif.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 4741d7451d..764298bac8 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -4485,11 +4485,12 @@ BIF_RETTYPE system_flag_2(BIF_ALIST_2)
ERTS_TRACER_CLEAR(&old_seq_tracer);
BIF_RET(ret);
- } else if (BIF_ARG_1 == make_small(1)) {
+ } else if (BIF_ARG_1 == am_reset_seq_trace) {
int i, max;
- erts_proc_unlock(BIF_P, ERTS_PROC_LOCK_MAIN);
- erts_thr_progress_block();
+ erts_proc_unlock(BIF_P, ERTS_PROC_LOCK_MAIN);
+ erts_thr_progress_block();
+
max = erts_ptab_max(&erts_proc);
for (i = 0; i < max; i++) {
Process *p = erts_pix2proc(i);
@@ -4501,13 +4502,14 @@ BIF_RETTYPE system_flag_2(BIF_ALIST_2)
#endif
p->seq_trace_clock = 0;
p->seq_trace_lastcnt = 0;
-
+ erts_proc_lock(p, ERTS_PROC_LOCK_MAIN|ERTS_PROC_LOCK_MSGQ);
erts_proc_sig_clear_seq_trace_tokens(p);
+ erts_proc_unlock(p, ERTS_PROC_LOCK_MAIN|ERTS_PROC_LOCK_MSGQ);
}
}
- erts_thr_progress_unblock();
- erts_proc_lock(BIF_P, ERTS_PROC_LOCK_MAIN);
+ erts_thr_progress_unblock();
+ erts_proc_lock(BIF_P, ERTS_PROC_LOCK_MAIN);
BIF_RET(am_true);
} else if (BIF_ARG_1 == am_scheduler_wall_time) {