mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 20:53:50 -04:00
more CHECK_REENTRANT_MUTEX
This commit is contained in:
parent
b902d7d1c1
commit
c3aa9a995c
@ -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
|
||||||
|
@ -42,7 +42,7 @@ public:
|
|||||||
INLINE void release();
|
INLINE void release();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#ifndef NDEBUG
|
#ifdef CHECK_REENTRANT_MUTEX
|
||||||
int _lock_count;
|
int _lock_count;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user