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

Function cbm_httpd_activity_for_test

src/ui/httpd.c:339–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339cbm_httpd_activity_t cbm_httpd_activity_for_test(cbm_httpd_t *d) {
340 if (!d)
341 return CBM_HTTPD_ACTIVITY_IDLE;
342 cbm_mutex_lock(&d->active_mutex);
343 cbm_httpd_activity_t activity = CBM_HTTPD_ACTIVITY_IDLE;
344 if (d->active) {
345 activity = atomic_load_explicit(&d->active->response_started, memory_order_acquire)
346 ? CBM_HTTPD_ACTIVITY_RESPONDING
347 : CBM_HTTPD_ACTIVITY_READING_REQUEST;
348 }
349 cbm_mutex_unlock(&d->active_mutex);
350 return activity;
351}
352
353/* ── Accept ───────────────────────────────────────────────────── */
354

Callers 2

th_wait_httpd_activityFunction · 0.85

Calls 2

cbm_mutex_lockFunction · 0.85
cbm_mutex_unlockFunction · 0.85

Tested by 1

th_wait_httpd_activityFunction · 0.68