Fix compilation on GCC and other Linux fixes (#80)

This commit is contained in:
Tom Lally 2022-08-28 14:29:15 +01:00 committed by GitHub
parent 96dcc7c82e
commit 454b587e36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 339 additions and 292 deletions

View file

@ -398,7 +398,7 @@ namespace coreinit
else
track = (MEMBlockHeapTrackDEPR*)memory_getPointerFromVirtualOffsetAllowNull(_swapEndianU32(blockHeapHead->headBlock));
cemu_assert_debug(__popcnt(alignment) == 1); // not a supported alignment value
cemu_assert_debug(std::popcount<unsigned int>(alignment) == 1); // not a supported alignment value
while (track)
{
if (track->isFree != _swapEndianU32(0))

View file

@ -45,8 +45,8 @@ namespace coreinit
bool g_isMulticoreMode;
__declspec(thread) uint32 t_assignedCoreIndex;
__declspec(thread) Fiber* t_schedulerFiber;
THREAD_LOCAL uint32 t_assignedCoreIndex;
THREAD_LOCAL Fiber* t_schedulerFiber;
struct OSHostThread
{

View file

@ -28,7 +28,7 @@ namespace coreinit
osLib_returnFromFunction64(hCPU, osTime);
}
__declspec(noinline) uint64 coreinit_getTimeBase_dummy()
uint64 coreinit_getTimeBase_dummy()
{
return __rdtsc();
}

View file

@ -201,8 +201,8 @@ static_assert(sizeof(CURLMsg_t) <= 0xC, "sizeof(CURLMsg_t)");
size_t header_callback(char* buffer, size_t size, size_t nitems, void* userdata);
__declspec(thread) PPCConcurrentQueue<QueueMsg_t>* g_callerQueue;
__declspec(thread) ConcurrentQueue<QueueMsg_t>* g_threadQueue;
THREAD_LOCAL PPCConcurrentQueue<QueueMsg_t>* g_callerQueue;
THREAD_LOCAL ConcurrentQueue<QueueMsg_t>* g_threadQueue;
void CurlWorkerThread(CURL_t* curl, PPCConcurrentQueue<QueueMsg_t>* callerQueue, ConcurrentQueue<QueueMsg_t>* threadQueue)
{
g_callerQueue = callerQueue;