mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-27 13:49:54 -06:00
sysinfo.cpp: Implement utils::main_tid (main thread id)
Careful.
This commit is contained in:
parent
c69c70cf5f
commit
ded828dfc9
@ -476,3 +476,15 @@ u32 utils::get_cpu_model()
|
||||
|
||||
return g_value;
|
||||
}
|
||||
|
||||
namespace utils
|
||||
{
|
||||
extern const u64 main_tid = []() -> u64
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return GetCurrentThreadId();
|
||||
#else
|
||||
return reinterpret_cast<u64>(pthread_self());
|
||||
#endif
|
||||
}();
|
||||
}
|
||||
|
||||
@ -54,4 +54,6 @@ namespace utils
|
||||
u32 get_cpu_family();
|
||||
|
||||
u32 get_cpu_model();
|
||||
|
||||
extern const u64 main_tid;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user