[llvm-commits] CVS: llvm/lib/System/Mutex.cpp

Reid Spencer reid at x10sys.com
Tue Jul 12 20:02:17 PDT 2005



Changes in directory llvm/lib/System:

Mutex.cpp updated: 1.2 -> 1.3
---
Log message:

Don't call pthread_mutexattr_setpshared on FreeBSD because its implementation
of pthreads is missing that call (despite it violating the spec).


---
Diffs of the changes:  (+2 -0)

 Mutex.cpp |    2 ++
 1 files changed, 2 insertions(+)


Index: llvm/lib/System/Mutex.cpp
diff -u llvm/lib/System/Mutex.cpp:1.2 llvm/lib/System/Mutex.cpp:1.3
--- llvm/lib/System/Mutex.cpp:1.2	Tue Jul 12 21:15:17 2005
+++ llvm/lib/System/Mutex.cpp	Tue Jul 12 22:02:06 2005
@@ -62,8 +62,10 @@
     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);






More information about the llvm-commits mailing list