]> git.mxchange.org Git - simgear.git/commitdiff
Back out the shared mutex code since it only works when the mutex is in shared
authorehofman <ehofman>
Wed, 26 Oct 2005 11:19:58 +0000 (11:19 +0000)
committerehofman <ehofman>
Wed, 26 Oct 2005 11:19:58 +0000 (11:19 +0000)
memory[1], something we don't support anyhow.
This also fixes a FreeBSD compile problem.

[1] http://hypermail.linklord.com/new-httpd.old/2002/Jan/0557.html

simgear/threads/SGThread.hxx

index 5c52607a793a046c244f0b2d581fcacedcf9c4e9..69b10b8b501922155b7b483e9c8d7b775ed52792 100644 (file)
@@ -222,12 +222,19 @@ protected:
 
 inline SGMutex::SGMutex()
 {
-    pthread_mutexattr_t    mutex_attr;
+#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()