mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
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:
parent
07135570f4
commit
9a30ce5f18
48 changed files with 190 additions and 154 deletions
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#if defined(__GNUG__)
|
||||
#include <math.h>
|
||||
#define _fpclass(x) fpclassify(x)
|
||||
#include <cmath>
|
||||
#define _fpclass(x) std::fpclassify(x)
|
||||
#define __forceinline __attribute__((always_inline))
|
||||
#define _byteswap_ushort(x) __builtin_bswap16(x)
|
||||
#define _byteswap_ulong(x) __builtin_bswap32(x)
|
||||
|
@ -11,4 +11,9 @@
|
|||
#define mkdir(x) mkdir(x, 0777)
|
||||
#define INFINITE 0xFFFFFFFF
|
||||
#define _CRT_ALIGN(x) __attribute__((aligned(x)))
|
||||
#define InterlockedCompareExchange(ptr,new_val,old_val) __sync_val_compare_and_swap(ptr,old_val,new_val)
|
||||
#define InterlockedCompareExchange64(ptr,new_val,old_val) __sync_val_compare_and_swap(ptr,old_val,new_val)
|
||||
#define _aligned_malloc(size,alignment) aligned_alloc(alignment,size)
|
||||
#define _aligned_free(pointer) free(pointer)
|
||||
#define DWORD int64_t
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue