| 25 | { |
| 26 | |
| 27 | int 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 |
no outgoing calls