mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-09-21 03:55:48 +02:00
wxgui:
* Moved some files around in an attempt to improve CoreEmu and UI separation. * Major upgrade to the UI's handling of savestates * Maintenance work to the C++ exception handling * Some improved error handling and message popups here or there git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1714 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
@@ -45,6 +45,8 @@ namespace Threading
|
||||
|
||||
void PersistentThread::Start()
|
||||
{
|
||||
if( m_running ) return;
|
||||
|
||||
if( pthread_create( &m_thread, NULL, _internal_callback, this ) != 0 )
|
||||
throw Exception::ThreadCreationError();
|
||||
|
||||
@@ -89,8 +91,13 @@ namespace Threading
|
||||
pthread_join( m_thread, (void**)&m_returncode );
|
||||
return m_returncode;
|
||||
}
|
||||
|
||||
bool PersistentThread::IsSelf() const
|
||||
{
|
||||
return pthread_self() == m_thread;
|
||||
}
|
||||
|
||||
bool Exists( pthread_t pid )
|
||||
bool PersistentThread::Exists( pthread_t pid )
|
||||
{
|
||||
// passing 0 to pthread_kill is a NOP, and returns the status of the thread only.
|
||||
return ( ESRCH != pthread_kill( pid, 0 ) );
|
||||
|
||||
Reference in New Issue
Block a user