8#include "os_detect.hpp"
9#include "hires_utc_clock.hpp"
10#if TT_OPERATING_SYSTEM == TT_OS_WINDOWS
27void set_thread_name(std::string_view name);
33#if TT_OPERATING_SYSTEM == TT_OS_WINDOWS
34using thread_id = uint32_t;
36using thread_id = uint64_t;
39inline thread_local thread_id current_thread_id_dummy = 0;
44[[nodiscard]]
inline thread_id current_thread_id() noexcept
46#if TT_OPERATING_SYSTEM == TT_OS_WINDOWS
48 constexpr uint64_t NT_TIB_CurrentThreadID = 0x48;
49 return __readgsdword(NT_TIB_CurrentThreadID);
52 return reinterpret_cast<uint64_t
>(¤t_thread_id_dummy);