Index: ext/libicpf/src/mutex.h =================================================================== diff -u -N -r474d770b00b0605bd50dec176b614ac28a0cd053 -r2b72d8a437d5843db8c14f68c8aa8484614d2f5b --- ext/libicpf/src/mutex.h (.../mutex.h) (revision 474d770b00b0605bd50dec176b614ac28a0cd053) +++ ext/libicpf/src/mutex.h (.../mutex.h) (revision 2b72d8a437d5843db8c14f68c8aa8484614d2f5b) @@ -34,7 +34,13 @@ BEGIN_ICPF_NAMESPACE -//class dumpctx; +#ifdef _DEBUG_MUTEX + #define MLOCK(mutex) (mutex).lock(__FILE__, __LINE__, __FUNCTION__) + #define MUNLOCK(mutex) (mutex).lock(__FILE__, __LINE__, __FUNCTION__) +#else + #define MLOCK(mutex) (mutex).lock() + #define MUNLOCK(mutex) (mutex).lock() +#endif /** \brief Class provides the locking and unlocking capabilities for use with threads. * @@ -78,6 +84,9 @@ bool unlock(); /**@}*/ + bool lock(const char_t* pszFile, ulong_t ulLine, const char_t* pszFunction); + bool unlock(const char_t* pszFile, ulong_t ulLine, const char_t* pszFunction); + private: #ifdef _WIN32 /// Underlying windows locking structure