From: ehofman Date: Mon, 14 Nov 2005 18:25:17 +0000 (+0000) Subject: Revert to the original (0.9.8) version, it causes more problems than it solves (did... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7da45cb49e0dde253320bf814e6031bf6915fa12;p=simgear.git Revert to the original (0.9.8) version, it causes more problems than it solves (did actually solve any?) --- diff --git a/simgear/threads/SGThread.hxx b/simgear/threads/SGThread.hxx index 69b10b8b..fcbc0cb5 100644 --- a/simgear/threads/SGThread.hxx +++ b/simgear/threads/SGThread.hxx @@ -134,13 +134,8 @@ SGThread::~SGThread() inline int SGThread::start( unsigned cpu ) { - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - - int status = pthread_create( &tid, &attr, start_handler, this ); + int status = pthread_create( &tid, 0, start_handler, this ); assert( status == 0 ); - pthread_attr_destroy(&attr); #if defined( sgi ) if ( !status && !cpu ) pthread_setrunon_np( cpu ); @@ -222,19 +217,8 @@ protected: inline SGMutex::SGMutex() { -#if 0 - // Note: This will only work if the mutex is in shared memory, - // something we don't support enyhow. -EMH- - pthread_mutexattr_t mutex_attr = 0; - pthread_mutexattr_init(&mutex_attr); - pthread_mutexattr_setpshared(&mutex_attr, PTHREAD_PROCESS_SHARED); - int status = pthread_mutex_init( &mutex, &mutex_attr ); - assert( status == 0 ); - pthread_mutexattr_destroy(&mutex_attr); -#else int status = pthread_mutex_init( &mutex, 0 ); assert( status == 0 ); -#endif } inline SGMutex::~SGMutex()