MCPcopy Create free account
hub / github.com/acl-dev/acl / pthread_fkey_create

Function pthread_fkey_create

lib_fiber/c/src/common/pthread_patch.c:210–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void pthread_fkey_create(void)
211{
212 pthread_once(&__control_once, thread_once);
213
214 FLS_KEY *fkey = (FLS_KEY*) TlsGetValue(__tls_key);
215 if (fkey == NULL) {
216 assert(!acl_fiber_scheduled());
217 fkey = (FLS_KEY*) mem_calloc(sizeof(FLS_KEY), 1);
218 fkey->locals = fifo_new();
219 FlsSetValue(__fls_key, fkey);
220 TlsSetValue(__tls_key, fkey);
221 }
222}
223
224int pthread_key_create(pthread_key_t *key_ptr, void (*destructor)(void*))
225{

Callers 2

thread_initFunction · 0.85
acl_fiber_scheduleFunction · 0.85

Calls 4

pthread_onceFunction · 0.85
mem_callocFunction · 0.85
fifo_newFunction · 0.70
acl_fiber_scheduledFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…