mirror of https://github.com/PCSX2/pcsx2.git
Fix the usual myriad of Linux compilation errors.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2064 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
efc35405f8
commit
aa2e053366
|
@ -70,7 +70,7 @@ protected:
|
||||||
typedef typename ListenerList::const_iterator ConstIterator;
|
typedef typename ListenerList::const_iterator ConstIterator;
|
||||||
|
|
||||||
ListenerList m_listeners;
|
ListenerList m_listeners;
|
||||||
|
|
||||||
// This is a cached copy of the listener list used to handle standard dispatching, which
|
// 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.
|
// allows for self-modification of the EventSource's listener list by the listeners.
|
||||||
// Translation: The dispatcher uses this copy instead, to avoid iterator invalidation.
|
// Translation: The dispatcher uses this copy instead, to avoid iterator invalidation.
|
||||||
|
@ -129,7 +129,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
__forceinline void _DispatchRaw( ConstIterator& iter, const ConstIterator& iend, EvtType& evt )
|
__forceinline void _DispatchRaw( ConstIterator iter, const ConstIterator& iend, EvtType& evt )
|
||||||
{
|
{
|
||||||
while( iter != iend )
|
while( iter != iend )
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,23 +18,24 @@
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
#include "System/PageFaultSource.h"
|
||||||
|
|
||||||
extern void SignalExit(int sig);
|
extern void SignalExit(int sig);
|
||||||
|
|
||||||
static const uptr m_pagemask = getpagesize()-1;
|
static const uptr m_pagemask = getpagesize()-1;
|
||||||
|
|
||||||
// Linux implementation of SIGSEGV handler. Bind it using sigaction().
|
// 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,
|
// Note: Use of most stdio functions isn't safe here. Avoid console logs,
|
||||||
// assertions, file logs, or just about anything else useful.
|
// assertions, file logs, or just about anything else useful.
|
||||||
|
|
||||||
PageFaultInfo info( (uptr)info->si_addr & ~m_pagemask );
|
PageFaultInfo pfinfo( (uptr)siginfo->si_addr & ~m_pagemask );
|
||||||
Source_AccessViolation.DispatchException( info );
|
Source_PageFault.DispatchException( pfinfo );
|
||||||
|
|
||||||
// resumes execution right where we left off (re-executes instruction that
|
// resumes execution right where we left off (re-executes instruction that
|
||||||
// caused the SIGSEGV).
|
// caused the SIGSEGV).
|
||||||
if( info.handled ) return;
|
if( pfinfo.handled ) return;
|
||||||
|
|
||||||
// Bad mojo! Completely invalid address.
|
// Bad mojo! Completely invalid address.
|
||||||
// Instigate a trap if we're in a debugger, and if not then do a SIGKILL.
|
// 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);
|
sigaction(SIGSEGV, &sa, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NTFS_CompressFile( const wxString& file, bool compressStatus=true ) {}
|
void NTFS_CompressFile( const wxString& file, bool compressStatus ) {}
|
||||||
|
|
|
@ -27,7 +27,7 @@ struct PageFaultInfo
|
||||||
{
|
{
|
||||||
uptr addr;
|
uptr addr;
|
||||||
bool handled;
|
bool handled;
|
||||||
|
|
||||||
PageFaultInfo( uptr address )
|
PageFaultInfo( uptr address )
|
||||||
{
|
{
|
||||||
addr = address;
|
addr = address;
|
||||||
|
@ -60,8 +60,8 @@ extern void InstallSignalHandler();
|
||||||
|
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
|
|
||||||
# define PCSX2_PAGEFAULT_PROTECT()
|
# define PCSX2_PAGEFAULT_PROTECT
|
||||||
# define PCSX2_PAGEFAULT_EXCEPT()
|
# define PCSX2_PAGEFAULT_EXCEPT
|
||||||
|
|
||||||
#elif defined( _WIN32 )
|
#elif defined( _WIN32 )
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "SamplProf.h"
|
#include "SamplProf.h"
|
||||||
#include "Dump.h"
|
#include "Dump.h"
|
||||||
|
|
||||||
#include "SysThreads.h"
|
#include "System/SysThreads.h"
|
||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
|
|
||||||
using namespace x86Emitter;
|
using namespace x86Emitter;
|
||||||
|
@ -40,7 +40,6 @@ static uptr hwLUT[0x10000];
|
||||||
#define HWADDR(mem) (hwLUT[mem >> 16] + (mem))
|
#define HWADDR(mem) (hwLUT[mem >> 16] + (mem))
|
||||||
|
|
||||||
u32 s_nBlockCycles = 0; // cycles of current block recompiling
|
u32 s_nBlockCycles = 0; // cycles of current block recompiling
|
||||||
//u8* dyna_block_discard_recmem=0;
|
|
||||||
|
|
||||||
u32 pc; // recompiler pc
|
u32 pc; // recompiler pc
|
||||||
int branch; // set for branch
|
int branch; // set for branch
|
||||||
|
@ -660,7 +659,7 @@ static void recCheckExecutionState()
|
||||||
{
|
{
|
||||||
#if PCSX2_SEH
|
#if PCSX2_SEH
|
||||||
SysCoreThread::Get().StateCheckInThread();
|
SysCoreThread::Get().StateCheckInThread();
|
||||||
|
|
||||||
if( eeRecIsReset )
|
if( eeRecIsReset )
|
||||||
throw Exception::ForceDispatcherReg();
|
throw Exception::ForceDispatcherReg();
|
||||||
#else
|
#else
|
||||||
|
@ -726,14 +725,14 @@ static void recExecute()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EnterRecompiledCode();
|
EnterRecompiledCode();
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
} __finally
|
} __finally
|
||||||
{
|
{
|
||||||
// This assertion is designed to help me troubleshoot the setjmp behavior from Win32.
|
// 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
|
// 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.
|
// 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
|
// 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? :/
|
// even when I use longjmp to restart the loop. Maybe a workaround exists? :/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue