Skip to content

Commit

Permalink
Add threadid support for emscripten and bsd
Browse files Browse the repository at this point in the history
  • Loading branch information
jesswong committed Dec 5, 2024
1 parent ef5d04e commit ba96eb2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/async_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ static std::uint64_t get_os_thread_id() {
return tid;
# elif defined(_WIN32)
return std::uint64_t(GetCurrentThreadId());
# elif defined(__FreeBSD__)
long tid;
thr_self(&tid);
# elif defined(__EMSCRIPTEN__)
return 0;
# else
return std::uint64_t(gettid());
# endif
Expand Down

0 comments on commit ba96eb2

Please sign in to comment.