| 293 | } |
| 294 | |
| 295 | static void bootstrap_pause(uint64_t deadline) { |
| 296 | uint64_t now = cbm_now_ms(); |
| 297 | if (now >= deadline) { |
| 298 | return; |
| 299 | } |
| 300 | uint64_t remaining_ms = deadline - now; |
| 301 | struct timespec pause = { |
| 302 | .tv_sec = 0, |
| 303 | .tv_nsec = remaining_ms > 1 ? BOOTSTRAP_RETRY_NS : (long)(remaining_ms * 1000000ULL), |
| 304 | }; |
| 305 | (void)cbm_nanosleep(&pause, NULL); |
| 306 | } |
| 307 | |
| 308 | static void bootstrap_startup_lock_release_complete(const cbm_daemon_bootstrap_ops_t *ops, |
| 309 | cbm_daemon_bootstrap_lock_t *lock_io) { |
no test coverage detected