| 480 | |
| 481 | #ifdef CBM_DIAGNOSTICS_ENABLE_TEST_API |
| 482 | static void diag_test_pause_writer(void) { |
| 483 | if (!atomic_load_explicit(&g_diag_test_hold_writer, memory_order_acquire)) { |
| 484 | return; |
| 485 | } |
| 486 | atomic_store_explicit(&g_diag_test_writer_reached, true, memory_order_release); |
| 487 | while (atomic_load_explicit(&g_diag_test_hold_writer, memory_order_acquire)) { |
| 488 | diag_sleep_ms(DIAG_WAIT_SLICE_MS); |
| 489 | } |
| 490 | } |
| 491 | #endif |
| 492 | |
| 493 | static void append_trajectory(long uptime, size_t rss, size_t peak_rss, size_t commit, |
no test coverage detected