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

Function host_log_close

src/daemon/host.c:149–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149static void host_log_close(void) {
150 cbm_log_set_sink(NULL);
151 if (g_host_log_mutex_initialized) {
152 cbm_mutex_lock(&g_host_log_mutex);
153 }
154 FILE *file = g_host_log_file;
155 g_host_log_file = NULL;
156 if (file) {
157 (void)fclose(file);
158 }
159 if (g_host_log_mutex_initialized) {
160 cbm_mutex_unlock(&g_host_log_mutex);
161 cbm_mutex_destroy(&g_host_log_mutex);
162 g_host_log_mutex_initialized = false;
163 }
164}
165
166static uint64_t host_deadline_after(uint32_t timeout_ms) {
167 uint64_t now = cbm_now_ms();

Callers 1

cbm_daemon_host_runFunction · 0.85

Calls 4

cbm_log_set_sinkFunction · 0.85
cbm_mutex_lockFunction · 0.85
cbm_mutex_unlockFunction · 0.85
cbm_mutex_destroyFunction · 0.85

Tested by

no test coverage detected