X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSystem%2FRWMutex.cpp;h=deb04709d829c6e5c2910ea336e2d6a214052603;hb=87e0697a46ad214be0d8fce0955494f4085de95a;hp=5faf220eb91688c7510d4b60fa06edebb098c718;hpb=740eb5323e449ae4b00a3f657bffaceadcbe2624;p=oota-llvm.git diff --git a/lib/System/RWMutex.cpp b/lib/System/RWMutex.cpp index 5faf220eb91..deb04709d82 100644 --- a/lib/System/RWMutex.cpp +++ b/lib/System/RWMutex.cpp @@ -71,23 +71,9 @@ 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); + (void)errorcode; assert(errorcode == 0); // Assign the data member