Use gettid() on Linux, don't use std:🧵:id

pthread_self() returns a large opaque pointer which is harder to use.
This commit is contained in:
Nekotekina 2022-07-09 14:42:03 +03:00 committed by Ivan
parent 0c6df39a45
commit 786510a937
5 changed files with 12 additions and 20 deletions

View file

@ -652,12 +652,8 @@ u32 utils::get_cpu_model()
namespace utils
{
extern const u64 main_tid = []() -> u64
u64 _get_main_tid()
{
#ifdef _WIN32
return GetCurrentThreadId();
#else
return reinterpret_cast<u64>(pthread_self());
#endif
}();
return thread_ctrl::get_tid();
}
}