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 | 60e72d9ebc2b718929159d8860af2ded21ed8f23 (patch) | |
tree | c54aa13ed438e2dbfa2b5505700edbcbe7f64efa /lib | |
parent | 6719784148c973bbafe82dfa778eed7562f9c66a (diff) | |
download | external_llvm-60e72d9ebc2b718929159d8860af2ded21ed8f23.zip external_llvm-60e72d9ebc2b718929159d8860af2ded21ed8f23.tar.gz external_llvm-60e72d9ebc2b718929159d8860af2ded21ed8f23.tar.bz2 |
remove code setting rw locks to PTHREAD_PROCESS_PRIVATE, which
is the default. Patch by NAKAMURA Takumi!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/System/RWMutex.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/System/RWMutex.cpp b/lib/System/RWMutex.cpp index 5faf220..5a33364 100644 --- a/lib/System/RWMutex.cpp +++ b/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 |