ArmNN
 21.02
armnnUtils::Threads Namespace Reference

Functions

int GetCurrentThreadId ()
 

Function Documentation

◆ GetCurrentThreadId()

int GetCurrentThreadId ( )

Definition at line 27 of file Threads.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), TimelineUtilityMethods::RecordEvent(), and VerifyTimelineEventBinaryPacket().

28 {
29 #if defined(__linux__)
30  return static_cast<int>(gettid());
31 #elif defined(_MSC_VER)
33 #elif defined(__APPLE__)
34  uint64_t threadId;
35  int iRet = pthread_threadid_np(NULL, &threadId);
36  if (iRet != 0)
37  {
38  return 0;
39  }
40  return static_cast<int>(threadId);
41 #endif
42 }
int GetCurrentThreadId()
Definition: Threads.cpp:27