mirror of
https://github.com/yse/easy_profiler.git
synced 2025-01-14 00:27:55 +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__)
|
#elif defined(__QNX__)
|
||||||
EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)gettid();
|
EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)gettid();
|
||||||
return _id;
|
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
|
#else
|
||||||
EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)syscall(__NR_gettid);
|
EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)syscall(__NR_gettid);
|
||||||
return _id;
|
return _id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user