From 2b93aa07097f2de2d07c39b158213fde0b821c2c Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Sat, 1 Nov 2008 06:47:55 +0000 Subject: [PATCH] Code cleanups for Linux builds (no functional changes) git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@263 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/Counters.c | 8 ++++---- pcsx2/Hw.h | 10 ++-------- pcsx2/Misc.h | 16 ---------------- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/pcsx2/Counters.c b/pcsx2/Counters.c index 14cae9e168..faabb25f96 100644 --- a/pcsx2/Counters.c +++ b/pcsx2/Counters.c @@ -269,7 +269,7 @@ void vSyncDebugStuff() { #endif } -__forceinline void frameLimit() +static __forceinline void frameLimit() { switch(CHECK_FRAMELIMIT) { case PCSX2_FRAMELIMIT_LIMIT: @@ -336,7 +336,7 @@ __forceinline void frameLimit() } } -__forceinline void VSyncStart(u32 sCycle) // VSync Start +static __forceinline void VSyncStart(u32 sCycle) // VSync Start { vSyncDebugStuff(); // EE Profiling and Debug code if ((CSRw & 0x8)) GSCSRr|= 0x8; @@ -349,7 +349,7 @@ __forceinline void VSyncStart(u32 sCycle) // VSync Start if (Config.Patch) applypatch(1); // Apply patches (ToDo: clean up patch code) } -__forceinline void VSyncEnd(u32 sCycle) // VSync End +static __forceinline void VSyncEnd(u32 sCycle) // VSync End { iFrame++; *(u32*)(PS2MEM_GS+0x1000) ^= 0x2000; // swap the vsync field @@ -390,7 +390,7 @@ __forceinline void VSyncEnd(u32 sCycle) // VSync End } \ } -__forceinline void hScanline() +static __forceinline void hScanline() { u32 difference = (cpuRegs.cycle - counters[4].sCycle); diff --git a/pcsx2/Hw.h b/pcsx2/Hw.h index 04cebd9508..25e8db51a9 100644 --- a/pcsx2/Hw.h +++ b/pcsx2/Hw.h @@ -310,11 +310,9 @@ typedef struct tagDMACh{ #ifdef _WIN32 extern PSMEMORYMAP* memLUT; - -extern __forceinline u8* dmaGetAddr(u32 mem) -#else -static __forceinline u8* dmaGetAddr(u32 mem) #endif + +static __forceinline u8* dmaGetAddr(u32 mem) { u8* p, *pbase; mem &= ~0xf; @@ -348,11 +346,7 @@ extern u8 *psS; //0.015 mb, scratch pad extern uptr *memLUTR; -#ifdef _WIN32 -extern __forceinline void *dmaGetAddr(u32 addr) { -#else static __forceinline void *dmaGetAddr(u32 addr) { -#endif u8 *ptr; /*#ifdef DMA_LOG diff --git a/pcsx2/Misc.h b/pcsx2/Misc.h index 287f9d4a89..032927ebad 100644 --- a/pcsx2/Misc.h +++ b/pcsx2/Misc.h @@ -159,11 +159,7 @@ BOOL Save_Patch_Proc( char * filename ); #include -#ifdef _WIN32 -extern __forceinline u32 timeGetTime() -#else static __forceinline u32 timeGetTime() -#endif { struct timeb t; ftime(&t); @@ -334,11 +330,7 @@ typedef void* PVOID; return __test_and_set(__p, (unsigned long)__q); # endif }*/ -#ifdef _WIN32 -extern __forceinline void InterlockedExchangePointer(PVOID volatile* Target, void* Value) -#else static __forceinline void InterlockedExchangePointer(PVOID volatile* Target, void* Value) -#endif { #ifdef __x86_64__ __asm__ __volatile__(".intel_syntax\n" @@ -351,11 +343,7 @@ static __forceinline void InterlockedExchangePointer(PVOID volatile* Target, voi #endif } -#ifdef _WIN32 -extern __forceinline long InterlockedExchange(long volatile* Target, long Value) -#else static __forceinline long InterlockedExchange(long volatile* Target, long Value) -#endif { __asm__ __volatile__(".intel_syntax\n" "lock xchg [%0], %%eax\n" @@ -363,11 +351,7 @@ static __forceinline long InterlockedExchange(long volatile* Target, long Value) return 0; // The only function that even looks at this is a debugging function } -#ifdef _WIN32 -extern __forceinline long InterlockedExchangeAdd(long volatile* Addend, long Value) -#else static __forceinline long InterlockedExchangeAdd(long volatile* Addend, long Value) -#endif { __asm__ __volatile__(".intel_syntax\n" "lock xadd [%0], %%eax\n"