MCPcopy Create free account
hub / github.com/ARM-software/armnn / GetCurrentThreadId

Function GetCurrentThreadId

profiling/common/src/Threads.cpp:27–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25{
26
27int GetCurrentThreadId()
28{
29#if !defined(ARMNN_DISABLE_THREADS)
30#if defined(__linux__)
31 return static_cast<int>(gettid());
32#elif defined(_MSC_VER)
33 return ::GetCurrentThreadId();
34#elif defined(__APPLE__)
35 uint64_t threadId;
36 int iRet = pthread_threadid_np(NULL, &threadId);
37 if (iRet != 0)
38 {
39 return 0;
40 }
41 return static_cast<int>(threadId);
42#endif
43#else
44 return 0;
45#endif
46}
47
48} // namespace pipe
49} // namespace arm

Callers 5

RecordEventMethod · 0.85
TimelineTests.cppFile · 0.85

Calls

no outgoing calls

Tested by 1