MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / getThreadLocalData

Method getThreadLocalData

src/threadLocalData.h:29–40  ·  view source on GitHub ↗

Get the `asprof_thread_local_data`. See the `asprof_get_thread_local_data` docs.

Source from the content-addressed store, hash-verified

27
28 // Get the `asprof_thread_local_data`. See the `asprof_get_thread_local_data` docs.
29 static asprof_thread_local_data* getThreadLocalData(void) {
30 if (_profiler_data_key == -1) {
31 return NULL;
32 }
33
34 asprof_thread_local_data* val = (asprof_thread_local_data*) pthread_getspecific(_profiler_data_key);
35 if (val == NULL) {
36 return initThreadLocalData(_profiler_data_key);
37 }
38
39 return val;
40 }
41
42 private:
43 static asprof_thread_local_data* initThreadLocalData(pthread_key_t profiler_data_key);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected