Don't call pthread_mutexattr_setpshared on FreeBSD because its implementation
authorReid Spencer <rspencer@reidspencer.com>
Wed, 13 Jul 2005 03:02:06 +0000 (03:02 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Wed, 13 Jul 2005 03:02:06 +0000 (03:02 +0000)
of pthreads is missing that call (despite it violating the spec).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22423 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Mutex.cpp

index 4ec5af302f935fd47c09b8235e640f1e83416d3d..799beee6806657f3b11356f24c7d2e2882e14f1c 100644 (file)
@@ -62,8 +62,10 @@ Mutex::Mutex( bool recursive)
     errorcode = pthread_mutexattr_settype(&attr, kind);
     assert(errorcode == 0);
 
+#ifndef __FreeBSD__
     // Make it a process local mutex
     errorcode = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE);
+#endif
 
     // Initialize the mutex
     errorcode = pthread_mutex_init(mutex, &attr);