| 202 | } |
| 203 | |
| 204 | static void host_cleanup_release_until_complete(cbm_daemon_host_cleanup_release_for_test_fn release, |
| 205 | void *context, const char *component) { |
| 206 | if (!release) { |
| 207 | return; |
| 208 | } |
| 209 | uint64_t deadline = host_deadline_after(HOST_COORDINATION_CLEANUP_MS); |
| 210 | while (!release(context)) { |
| 211 | if (cbm_now_ms() >= deadline) { |
| 212 | host_cleanup_force_terminate(component); |
| 213 | } |
| 214 | cbm_usleep(1000); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | void cbm_daemon_host_cleanup_release_until_complete_for_test( |
| 219 | cbm_daemon_host_cleanup_release_for_test_fn release, void *context) { |
no test coverage detected