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

Function init_profiler_data_key

src/threadLocalData.cpp:9–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "threadLocalData.h"
8
9static pthread_key_t init_profiler_data_key() {
10 pthread_key_t profiler_data_key;
11
12 if (pthread_key_create(&profiler_data_key, free) != 0) {
13 return -1;
14 }
15
16 return profiler_data_key;
17}
18
19// A key that points to a malloc'd asprof_thread_local_data
20pthread_key_t ThreadLocalData::_profiler_data_key = init_profiler_data_key();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected