mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
parent
8011cc8ec4
commit
01dbb8eb9a
42 changed files with 1687 additions and 613 deletions
|
@ -1,15 +1,21 @@
|
|||
#include <stdafx.h>
|
||||
#include <Utilities/SMutex.h>
|
||||
|
||||
|
||||
__forceinline void SM_Sleep()
|
||||
{
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
__declspec(thread)
|
||||
#else
|
||||
thread_local
|
||||
#endif
|
||||
size_t g_this_thread_id = 0;
|
||||
|
||||
__forceinline size_t SM_GetCurrentThreadId()
|
||||
{
|
||||
return std::hash<std::thread::id>()(std::this_thread::get_id());
|
||||
return g_this_thread_id ? g_this_thread_id : g_this_thread_id = std::hash<std::thread::id>()(std::this_thread::get_id());
|
||||
}
|
||||
|
||||
__forceinline u32 SM_GetCurrentCPUThreadId()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue