Added mutex to lock of ReentrantMutex

This commit is contained in:
Robert Osfield
2007-01-04 20:50:35 +00:00
parent 778fbc78e5
commit 9a31b7652e
2 changed files with 16 additions and 2 deletions

View File

@@ -42,7 +42,9 @@ class OSGDB_EXPORT ReentrantMutex : public OpenThreads::Mutex
ReentrantMutex& operator =(const ReentrantMutex&) { return *(this); }
OpenThreads::Thread* _threadHoldingMutex;
unsigned int _lockCount;
OpenThreads::Mutex _lockCountMutex;
unsigned int _lockCount;
};
@@ -66,9 +68,14 @@ class OSGDB_EXPORT ReadWriteMutex
ReadWriteMutex(const ReadWriteMutex&) {}
ReadWriteMutex& operator = (const ReadWriteMutex&) { return *(this); }
#if 1
ReentrantMutex _readWriteMutex;
ReentrantMutex _readCountMutex;
#else
OpenThreads::Mutex _readWriteMutex;
OpenThreads::Mutex _readCountMutex;
#endif
unsigned int _readCount;
};