mirror of https://github.com/PCSX2/pcsx2.git
... not sure how I missed committing this last night. >_< (fixes compilation errors)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3333 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
8ae1e91f7f
commit
f3b7c09851
|
@ -138,8 +138,7 @@ namespace Threading
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~pxThread() throw();
|
virtual ~pxThread() throw();
|
||||||
pxThread();
|
pxThread( const wxString& name=L"pxThread" );
|
||||||
pxThread( const char* name );
|
|
||||||
|
|
||||||
pthread_t GetId() const { return m_thread; }
|
pthread_t GetId() const { return m_thread; }
|
||||||
u64 GetCpuTime() const;
|
u64 GetCpuTime() const;
|
||||||
|
|
|
@ -98,10 +98,22 @@ protected:
|
||||||
|
|
||||||
virtual T* _virtual_realloc( int newsize )
|
virtual T* _virtual_realloc( int newsize )
|
||||||
{
|
{
|
||||||
return (T*)((m_ptr == NULL) ?
|
T* retval = (T*)((m_ptr == NULL) ?
|
||||||
malloc( newsize * sizeof(T) ) :
|
malloc( newsize * sizeof(T) ) :
|
||||||
realloc( m_ptr, newsize * sizeof(T) )
|
realloc( m_ptr, newsize * sizeof(T) )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if( IsDebugBuild )
|
||||||
|
{
|
||||||
|
// Zero everything out to 0xbaadf00d, so that its obviously uncleared
|
||||||
|
// to a debuggee
|
||||||
|
|
||||||
|
u32* fill = (u32*)&retval[m_size];
|
||||||
|
const u32* end = (u32*)((((uptr)&retval[newsize-1])-3) & ~0x3);
|
||||||
|
for( ; fill<end; ++fill ) *fill = 0xbaadf00d;
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -154,8 +154,8 @@ void Threading::pxThread::_pt_callback_cleanup( void* handle )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Threading::pxThread::pxThread()
|
Threading::pxThread::pxThread( const wxString& name )
|
||||||
: m_name( L"pxThread" )
|
: m_name( name )
|
||||||
{
|
{
|
||||||
m_detached = true; // start out with m_thread in detached/invalid state
|
m_detached = true; // start out with m_thread in detached/invalid state
|
||||||
m_running = false;
|
m_running = false;
|
||||||
|
|
Loading…
Reference in New Issue