Skip to content

Commit

Permalink
Add threadid macros for emscripten (#646)
Browse files Browse the repository at this point in the history
* Add threadid support for emscripten and bsd

* address comments
  • Loading branch information
jesswong authored Dec 5, 2024
1 parent ef5d04e commit 7e17b0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/async_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ static std::uint64_t get_os_thread_id() {
return tid;
# elif defined(_WIN32)
return std::uint64_t(GetCurrentThreadId());
# else
# elif defined(__EMSCRIPTEN__)
return 0;
# elif defined(__linux__)
return std::uint64_t(gettid());
# else
# error "Unsupported platform in get_os_thread_id"
# endif
}
#endif // UNIFEX_ASYNC_STACK_ROOT_USE_PTHREAD == 0
Expand Down

0 comments on commit 7e17b0e

Please sign in to comment.