| 636 | } |
| 637 | |
| 638 | static void *diag_thread_fn(void *arg) { |
| 639 | (void)arg; |
| 640 | while (!atomic_load_explicit(&g_diag_stop, memory_order_acquire)) { |
| 641 | write_diagnostics(); |
| 642 | if (!atomic_load_explicit(&g_diag_stop, memory_order_acquire)) { |
| 643 | diag_wait_for_interval(); |
| 644 | } |
| 645 | } |
| 646 | atomic_store_explicit(&g_diag_done, true, memory_order_release); |
| 647 | return NULL; |
| 648 | } |
| 649 | |
| 650 | static void diag_cleanup_live_files(void) { |
| 651 | diag_native_unlink(DIAG_SNAPSHOT_NAME); |
nothing calls this directly
no test coverage detected