MCPcopy Create free account
hub / github.com/facebook/react / ThreadLocalCheckReturn

Function ThreadLocalCheckReturn

scripts/perf-counters/src/thread-local.h:87–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85// helper
86
87inline void ThreadLocalCheckReturn(int ret, const char *funcName) {
88 if (ret != 0) {
89 // This is used from global constructors so the safest thing to do is just
90 // print to stderr and exit().
91 fprintf(stderr, "%s returned %d", funcName, ret);
92 exit(1);
93 }
94}
95
96inline void ThreadLocalCreateKey(pthread_key_t *key, void (*del)(void*)) {
97 int ret = pthread_key_create(key, del);

Callers 2

ThreadLocalCreateKeyFunction · 0.85
ThreadLocalSetValueFunction · 0.85

Calls 1

exitFunction · 0.50

Tested by

no test coverage detected