MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / th_wait_atomic_int

Function th_wait_atomic_int

tests/test_httpd.c:667–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667static bool th_wait_atomic_int(atomic_int *value, int expected, uint32_t timeout_ms) {
668 uint64_t deadline = cbm_now_ms() + timeout_ms;
669 while (cbm_now_ms() < deadline) {
670 if (atomic_load(value) == expected) {
671 return true;
672 }
673 cbm_usleep(1000);
674 }
675 return atomic_load(value) == expected;
676}
677
678static bool th_wait_http_server_activity(cbm_http_server_t *server, cbm_httpd_activity_t expected,
679 uint32_t timeout_ms) {

Callers 2

test_httpd.cFile · 0.85
th_ui_index_probeFunction · 0.85

Calls 1

cbm_now_msFunction · 0.85

Tested by

no test coverage detected