wxgui: Moved some more files around in Common/Utilities, and merged against trunk.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1460 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine
2009-07-03 20:48:11 +00:00
86 changed files with 9050 additions and 1718 deletions
+21
View File
@@ -38,6 +38,7 @@ namespace Threading
void Thread::Start()
{
m_terminated = false;
if( pthread_create( &m_thread, NULL, _internal_callback, this ) != 0 )
throw Exception::ThreadCreationError();
}
@@ -135,6 +136,26 @@ namespace Threading
err = pthread_mutex_init( &mutex, NULL );
}
MutexLock::MutexLock( bool isRecursive )
{
if( isRecursive )
{
pthread_mutexattr_t mutexAttribute;
int status = pthread_mutexattr_init( &mutexAttribute );
if (status != 0) { /* ... */ }
status = pthread_mutexattr_settype( &mutexAttribute, PTHREAD_MUTEX_RECURSIVE);
if (status != 0) { /* ... */}
int err = 0;
err = pthread_mutex_init( &mutex, &mutexAttribute );
}
else
{
int err = 0;
err = pthread_mutex_init( &mutex, NULL );
}
}
MutexLock::~MutexLock()
{
pthread_mutex_destroy( &mutex );