aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-07-13 03:02:06 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-07-13 03:02:06 +0000
commit2499841461a95872a9fe15d310f1d71f94af76d9 (patch)
tree524180adff80c7519ba983ad574e16c0f02b7097 /lib/System
parent2497251e6dbbdf07b1ff72fa828c3ec8afe04881 (diff)
downloadexternal_llvm-2499841461a95872a9fe15d310f1d71f94af76d9.zip
external_llvm-2499841461a95872a9fe15d310f1d71f94af76d9.tar.gz
external_llvm-2499841461a95872a9fe15d310f1d71f94af76d9.tar.bz2
Don't call pthread_mutexattr_setpshared on FreeBSD because its implementation
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
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Mutex.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/System/Mutex.cpp b/lib/System/Mutex.cpp
index 4ec5af3..799beee 100644
--- a/lib/System/Mutex.cpp
+++ b/lib/System/Mutex.cpp
@@ -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);