diff options
author | Chris Lattner <sabre@nondot.org> | 2010-08-10 00:34:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-08-10 00:34:06 +0000 |
commit | 1ac0e2a027303228088454ffb1d378c1c2b25f39 (patch) | |
tree | 07a093aad09ab58c7bdb4be4f9dc257e7aa3e020 | |
parent | 92b009311286ba7a3100397d1c1f568c43b7c96e (diff) | |
download | bcm5719-llvm-1ac0e2a027303228088454ffb1d378c1c2b25f39.tar.gz bcm5719-llvm-1ac0e2a027303228088454ffb1d378c1c2b25f39.zip |
remove code setting rw locks to PTHREAD_PROCESS_PRIVATE, which
is the default. Patch by NAKAMURA Takumi!
llvm-svn: 110636
-rw-r--r-- | llvm/lib/System/RWMutex.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/llvm/lib/System/RWMutex.cpp b/llvm/lib/System/RWMutex.cpp index 5faf220eb91..5a33364aa50 100644 --- a/llvm/lib/System/RWMutex.cpp +++ b/llvm/lib/System/RWMutex.cpp @@ -71,23 +71,8 @@ RWMutexImpl::RWMutexImpl() bzero(rwlock, sizeof(pthread_rwlock_t)); #endif - pthread_rwlockattr_t attr; - - // Initialize the rwlock attributes - int errorcode = pthread_rwlockattr_init(&attr); - assert(errorcode == 0); - -#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) - // Make it a process local rwlock - errorcode = pthread_rwlockattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE); -#endif - // Initialize the rwlock - errorcode = pthread_rwlock_init(rwlock, &attr); - assert(errorcode == 0); - - // Destroy the attributes - errorcode = pthread_rwlockattr_destroy(&attr); + int errorcode = pthread_rwlock_init(rwlock, NULL); assert(errorcode == 0); // Assign the data member |