mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 08:01:51 +08:00
thread ID for EMSCRIPTEN
This commit is contained in:
parent
3104dd4ae7
commit
c5d9a94ed9
@ -77,6 +77,9 @@ inline profiler::thread_id_t getCurrentThreadId()
|
||||
#elif defined(__QNX__)
|
||||
EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)gettid();
|
||||
return _id;
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
EASY_THREAD_LOCAL static const profiler::thread_id_t _id = static_cast<profiler::thread_id_t>(pthread_self());
|
||||
return _id;
|
||||
#else
|
||||
EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)syscall(__NR_gettid);
|
||||
return _id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user