From aa2e053366e894b0c53a6ab1c909cb88dbfdbf85 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Fri, 23 Oct 2009 21:05:32 +0000 Subject: [PATCH] Fix the usual myriad of Linux compilation errors. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2064 96395faa-99c1-11dd-bbfe-3dabce05a288 --- common/include/Utilities/EventSource.h | 4 ++-- pcsx2/Linux/LnxHostSys.cpp | 11 ++++++----- pcsx2/System/PageFaultSource.h | 6 +++--- pcsx2/x86/ix86-32/iR5900-32.cpp | 9 ++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/common/include/Utilities/EventSource.h b/common/include/Utilities/EventSource.h index 3a06f263e2..af6473059b 100644 --- a/common/include/Utilities/EventSource.h +++ b/common/include/Utilities/EventSource.h @@ -70,7 +70,7 @@ protected: typedef typename ListenerList::const_iterator ConstIterator; ListenerList m_listeners; - + // This is a cached copy of the listener list used to handle standard dispatching, which // allows for self-modification of the EventSource's listener list by the listeners. // Translation: The dispatcher uses this copy instead, to avoid iterator invalidation. @@ -129,7 +129,7 @@ public: } protected: - __forceinline void _DispatchRaw( ConstIterator& iter, const ConstIterator& iend, EvtType& evt ) + __forceinline void _DispatchRaw( ConstIterator iter, const ConstIterator& iend, EvtType& evt ) { while( iter != iend ) { diff --git a/pcsx2/Linux/LnxHostSys.cpp b/pcsx2/Linux/LnxHostSys.cpp index 63430b94cb..ad2a7a07c1 100644 --- a/pcsx2/Linux/LnxHostSys.cpp +++ b/pcsx2/Linux/LnxHostSys.cpp @@ -18,23 +18,24 @@ #include #include #include "Common.h" +#include "System/PageFaultSource.h" extern void SignalExit(int sig); static const uptr m_pagemask = getpagesize()-1; // Linux implementation of SIGSEGV handler. Bind it using sigaction(). -static void SysPageFaultSignalFilter( int signal, siginfo_t *info, void * ) +static void SysPageFaultSignalFilter( int signal, siginfo_t *siginfo, void * ) { // Note: Use of most stdio functions isn't safe here. Avoid console logs, // assertions, file logs, or just about anything else useful. - PageFaultInfo info( (uptr)info->si_addr & ~m_pagemask ); - Source_AccessViolation.DispatchException( info ); + PageFaultInfo pfinfo( (uptr)siginfo->si_addr & ~m_pagemask ); + Source_PageFault.DispatchException( pfinfo ); // resumes execution right where we left off (re-executes instruction that // caused the SIGSEGV). - if( info.handled ) return; + if( pfinfo.handled ) return; // Bad mojo! Completely invalid address. // Instigate a trap if we're in a debugger, and if not then do a SIGKILL. @@ -53,4 +54,4 @@ void InstallSignalHandler() sigaction(SIGSEGV, &sa, NULL); } -void NTFS_CompressFile( const wxString& file, bool compressStatus=true ) {} +void NTFS_CompressFile( const wxString& file, bool compressStatus ) {} diff --git a/pcsx2/System/PageFaultSource.h b/pcsx2/System/PageFaultSource.h index 0bc8e0d674..232f76aa9f 100644 --- a/pcsx2/System/PageFaultSource.h +++ b/pcsx2/System/PageFaultSource.h @@ -27,7 +27,7 @@ struct PageFaultInfo { uptr addr; bool handled; - + PageFaultInfo( uptr address ) { addr = address; @@ -60,8 +60,8 @@ extern void InstallSignalHandler(); #ifdef __LINUX__ -# define PCSX2_PAGEFAULT_PROTECT() -# define PCSX2_PAGEFAULT_EXCEPT() +# define PCSX2_PAGEFAULT_PROTECT +# define PCSX2_PAGEFAULT_EXCEPT #elif defined( _WIN32 ) diff --git a/pcsx2/x86/ix86-32/iR5900-32.cpp b/pcsx2/x86/ix86-32/iR5900-32.cpp index 2e1689ffa9..792bd5c3aa 100644 --- a/pcsx2/x86/ix86-32/iR5900-32.cpp +++ b/pcsx2/x86/ix86-32/iR5900-32.cpp @@ -25,7 +25,7 @@ #include "SamplProf.h" #include "Dump.h" -#include "SysThreads.h" +#include "System/SysThreads.h" #include "GS.h" using namespace x86Emitter; @@ -40,7 +40,6 @@ static uptr hwLUT[0x10000]; #define HWADDR(mem) (hwLUT[mem >> 16] + (mem)) u32 s_nBlockCycles = 0; // cycles of current block recompiling -//u8* dyna_block_discard_recmem=0; u32 pc; // recompiler pc int branch; // set for branch @@ -660,7 +659,7 @@ static void recCheckExecutionState() { #if PCSX2_SEH SysCoreThread::Get().StateCheckInThread(); - + if( eeRecIsReset ) throw Exception::ForceDispatcherReg(); #else @@ -726,14 +725,14 @@ static void recExecute() #endif EnterRecompiledCode(); - + #ifdef _WIN32 } __finally { // This assertion is designed to help me troubleshoot the setjmp behavior from Win32. // If the recompiler throws an unhandled SEH exception with SEH support disabled (which // is typically a pthread_cancel) then this will fire and let me know. - + // FIXME: Doesn't work because SEH is remarkably clever and executes the _finally block // even when I use longjmp to restart the loop. Maybe a workaround exists? :/