From 86df93a216e0b656e70da2370cc58eebb7e08cd5 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 13 Jul 2005 03:02:06 +0000 Subject: [PATCH] Don't call pthread_mutexattr_setpshared on FreeBSD because its implementation of pthreads is missing that call (despite it violating the spec). llvm-svn: 22423 --- llvm/lib/System/Mutex.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/lib/System/Mutex.cpp b/llvm/lib/System/Mutex.cpp index 4ec5af302f93..799beee68066 100644 --- a/llvm/lib/System/Mutex.cpp +++ b/llvm/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);