|
@@ -24,7 +24,7 @@
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE MutexDummyImpl::
|
|
INLINE MutexDummyImpl::
|
|
|
MutexDummyImpl() {
|
|
MutexDummyImpl() {
|
|
|
-#ifndef NDEBUG
|
|
|
|
|
|
|
+#ifdef CHECK_REENTRANT_MUTEX
|
|
|
_lock_count = 0;
|
|
_lock_count = 0;
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
@@ -46,7 +46,7 @@ INLINE MutexDummyImpl::
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void MutexDummyImpl::
|
|
INLINE void MutexDummyImpl::
|
|
|
lock() {
|
|
lock() {
|
|
|
-#ifndef NDEBUG
|
|
|
|
|
|
|
+#ifdef CHECK_REENTRANT_MUTEX
|
|
|
_lock_count++;
|
|
_lock_count++;
|
|
|
nassertv(_lock_count == 1);
|
|
nassertv(_lock_count == 1);
|
|
|
#endif
|
|
#endif
|
|
@@ -59,7 +59,7 @@ lock() {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void MutexDummyImpl::
|
|
INLINE void MutexDummyImpl::
|
|
|
release() {
|
|
release() {
|
|
|
-#ifndef NDEBUG
|
|
|
|
|
|
|
+#ifdef CHECK_REENTRANT_MUTEX
|
|
|
_lock_count--;
|
|
_lock_count--;
|
|
|
nassertv(_lock_count == 0);
|
|
nassertv(_lock_count == 0);
|
|
|
#endif
|
|
#endif
|