aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/break.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2011-11-13 21:42:11 +0100
committerRickard Green <[email protected]>2011-11-13 21:42:11 +0100
commit73ee2e00fe0389d0362e89a74d1909510da9e0fd (patch)
treeb75c2a8b4b77885c6864ffd4f2d4825cb781c103 /erts/emulator/beam/break.c
parentc12befbdc957f7f166598c6d5143ce27a0d10fa8 (diff)
parentbc5818cfdd56e19a16357f4443d80a56426aa134 (diff)
downloadotp-73ee2e00fe0389d0362e89a74d1909510da9e0fd.tar.gz
otp-73ee2e00fe0389d0362e89a74d1909510da9e0fd.tar.bz2
otp-73ee2e00fe0389d0362e89a74d1909510da9e0fd.zip
Merge branch 'rickard/thr-progress-block/OTP-9631'
* rickard/thr-progress-block/OTP-9631: Replace system block with thread progress block
Diffstat (limited to 'erts/emulator/beam/break.c')
-rw-r--r--erts/emulator/beam/break.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c
index 8132bbeaa1..784e55ecd2 100644
--- a/erts/emulator/beam/break.c
+++ b/erts/emulator/beam/break.c
@@ -37,6 +37,7 @@
#include "beam_load.h"
#include "erl_instrument.h"
#include "erl_bif_timer.h"
+#include "erl_thr_progress.h"
/* Forward declarations -- should really appear somewhere else */
static void process_killer(void);
@@ -653,20 +654,18 @@ erl_crash_dump_v(char *file, int line, char* fmt, va_list args)
if (ERTS_SOMEONE_IS_CRASH_DUMPING)
return;
- /* Wait for all threads to block. If all threads haven't blocked
+#ifdef ERTS_SMP
+ /*
+ * Wait for all managed threads to block. If all threads haven't blocked
* after a minute, we go anyway and hope for the best...
*
* We do not release system again. We expect an exit() or abort() after
* dump has been written.
- *
- * NOTE: We allow gc therefore it is important not to lock *any*
- * process locks.
*/
- erts_smp_emergency_block_system(60000, ERTS_BS_FLG_ALLOW_GC);
+ erts_thr_progress_fatal_error_block(60000);
/* Either worked or not... */
/* Allow us to pass certain places without locking... */
-#ifdef ERTS_SMP
erts_smp_atomic32_set_mb(&erts_writing_erl_crash_dump, 1);
erts_smp_tsd_set(erts_is_crash_dumping_key, (void *) 1);
#else