| ... | ... | @@ -321,9 +321,6 @@ const PanicSwitch = struct { |
| 321 | 321 | /// until all panicking threads have dumped their traces. |
| 322 | 322 | var panicking = std.atomic.Value(u8).init(0); |
| 323 | 323 | |
| 324 | | // Locked to avoid interleaving panic messages from multiple threads. |
| 325 | | var panic_mutex = std.Thread.Mutex{}; |
| 326 | | |
| 327 | 324 | /// Tracks the state of the current panic. If the code within the |
| 328 | 325 | /// panic triggers a secondary panic, this allows us to recover. |
| 329 | 326 | threadlocal var panic_state_raw: PanicState = .{}; |
| ... | ... | @@ -391,7 +388,7 @@ const PanicSwitch = struct { |
| 391 | 388 | |
| 392 | 389 | state.recover_stage = .release_ref_count; |
| 393 | 390 | |
| 394 | | panic_mutex.lock(); |
| 391 | std.debug.lockStdErr(); |
| 395 | 392 | |
| 396 | 393 | state.recover_stage = .release_mutex; |
| 397 | 394 | |
| ... | ... | @@ -453,7 +450,7 @@ const PanicSwitch = struct { |
| 453 | 450 | noinline fn releaseMutex(state: *volatile PanicState) noreturn { |
| 454 | 451 | state.recover_stage = .abort; |
| 455 | 452 | |
| 456 | | panic_mutex.unlock(); |
| 453 | std.debug.unlockStdErr(); |
| 457 | 454 | |
| 458 | 455 | goTo(releaseRefCount, .{state}); |
| 459 | 456 | } |