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

Method PushTop

scripts/perf-counters/src/thread-local.cpp:36–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void ThreadLocalManager::PushTop(void* nodePtr, size_t nodeSize) {
37 auto& node = *static_cast<ThreadLocalNode<void>*>(nodePtr);
38 auto key = GetManager().m_key;
39 auto list = getList(pthread_getspecific(key));
40 if (UNLIKELY(!list)) {
41 ThreadLocalSetValue(key, list = new ThreadLocalList);
42 }
43 node.m_next = list->head;
44 node.m_size = nodeSize;
45 list->head = node.m_next;
46}
47
48ThreadLocalManager& ThreadLocalManager::GetManager() {
49 static ThreadLocalManager m;

Callers

nothing calls this directly

Calls 1

ThreadLocalSetValueFunction · 0.85

Tested by

no test coverage detected