summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorCarl C. Trieloff <cctrieloff@apache.org>2008-06-03 00:55:43 +0000
committerCarl C. Trieloff <cctrieloff@apache.org>2008-06-03 00:55:43 +0000
commit0cfdeb1423ca9fa7b3c2e39ac9231ecc0bc9db77 (patch)
treeaac687a5b77438e89a5a89030ecd41acaefcb204 /cpp/src
parent20385afad71ad3b8f8fcdaca1ef919555430dd7a (diff)
downloadqpid-python-0cfdeb1423ca9fa7b3c2e39ac9231ecc0bc9db77.tar.gz
QPID-1108 patch from Manuel Teira
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@662613 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/sys/posix/Mutex.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/cpp/src/qpid/sys/posix/Mutex.h b/cpp/src/qpid/sys/posix/Mutex.h
index ceb2794abe..9414f39d8f 100644
--- a/cpp/src/qpid/sys/posix/Mutex.h
+++ b/cpp/src/qpid/sys/posix/Mutex.h
@@ -79,7 +79,6 @@ protected:
*/
namespace {
pthread_once_t onceControl = PTHREAD_ONCE_INIT;
- pthread_rwlockattr_t rwlockattr;
pthread_mutexattr_t mutexattr;
void initMutexattr() {
@@ -87,10 +86,6 @@ namespace {
pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);
}
- void initRWlockattr() {
- pthread_rwlockattr_init(&rwlockattr);
- }
-
struct RecursiveMutexattr {
RecursiveMutexattr() {
pthread_once(&onceControl, initMutexattr);
@@ -100,21 +95,8 @@ namespace {
return &mutexattr;
}
};
- struct RecursiveRWlockattr {
- RecursiveRWlockattr() {
- pthread_once(&onceControl, initRWlockattr);
- }
-
- operator const pthread_rwlockattr_t*() const {
- return &rwlockattr;
- }
- };
-
+
RecursiveMutexattr recursiveMutexattr;
- RecursiveRWlockattr recursiveRWlockattr;
-
-
-
}
/**
@@ -169,7 +151,7 @@ bool Mutex::trylock() {
RWlock::RWlock() {
- QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_init(&rwlock, recursiveRWlockattr));
+ QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_init(&rwlock, NULL));
}
RWlock::~RWlock(){