mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
sysinfo.cpp: Implement utils::main_tid (main thread id)
Careful.
This commit is contained in:
parent
c69c70cf5f
commit
ded828dfc9
2 changed files with 14 additions and 0 deletions
|
@ -476,3 +476,15 @@ u32 utils::get_cpu_model()
|
||||||
|
|
||||||
return g_value;
|
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_family();
|
||||||
|
|
||||||
u32 get_cpu_model();
|
u32 get_cpu_model();
|
||||||
|
|
||||||
|
extern const u64 main_tid;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue