MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / tsd_set

Function tsd_set

deps/jemalloc/include/jemalloc/internal/tsd_tls.h:48–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48JEMALLOC_ALWAYS_INLINE void
49tsd_set(tsd_t *val) {
50 assert(tsd_booted);
51 if (likely(&tsd_tls != val)) {
52 tsd_tls = (*val);
53 }
54 if (pthread_setspecific(tsd_tsd, (void *)(&tsd_tls)) != 0) {
55 malloc_write("<jemalloc>: Error setting tsd.\n");
56 if (opt_abort) {
57 abort();
58 }
59 }
60}

Callers 2

tsd_fetch_slowFunction · 0.50
tsd_cleanupFunction · 0.50

Calls 1

malloc_writeFunction · 0.50

Tested by

no test coverage detected