Make buildable with GCC in Linux
* replace GetThreadID with std::this_thread.getId() * name all anonymous structs and unions that contain non-trivially constructable objects * made default constructor for big endian type noexcept to make it work with std::atomic * move instantiated specialized template function members ouside of the class definition to comply with the standard * added default instantiation for template parameter "=nullptr" * used the C++11 standardized thread_local instead of the __declspec(thread) * added transitional definitions to bridge the microsoft specific calls (compare and exchange and aligned alloc) * removed cyclic dependency between Emulator->CPUThreadManager->CPUThread->SMutex->Emulator->... * fixed some instances of indentation by space instead of tabs * surrounded some unused code with an #if 0 block to make sure it doesn't compile
This commit is contained in:
@@ -6,9 +6,9 @@ __forceinline void SM_Sleep()
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
__forceinline DWORD SM_GetCurrentThreadId()
|
||||
__forceinline std::thread::id SM_GetCurrentThreadId()
|
||||
{
|
||||
return GetCurrentThreadId();
|
||||
return std::this_thread::get_id();
|
||||
}
|
||||
|
||||
__forceinline u32 SM_GetCurrentCPUThreadId()
|
||||
@@ -23,4 +23,4 @@ __forceinline u32 SM_GetCurrentCPUThreadId()
|
||||
__forceinline be_t<u32> SM_GetCurrentCPUThreadIdBE()
|
||||
{
|
||||
return SM_GetCurrentCPUThreadId();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user