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

Function tls_worker

tests/test_worker_pool.c:207–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207static void tls_worker(int idx, void *ctx_ptr) {
208 (void)idx;
209 static _Thread_local int tls_val = 0;
210 _Atomic int *reuse_count = ctx_ptr;
211 if (tls_val == 42)
212 atomic_fetch_add(reuse_count, 1);
213 tls_val = 42;
214}
215
216TEST(tls_persistence_across_dispatch) {
217 _Atomic int reuse_count;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected