Index: ext/libicpf/src/mutex.cpp =================================================================== diff -u -r474d770b00b0605bd50dec176b614ac28a0cd053 -r2b72d8a437d5843db8c14f68c8aa8484614d2f5b --- ext/libicpf/src/mutex.cpp (.../mutex.cpp) (revision 474d770b00b0605bd50dec176b614ac28a0cd053) +++ ext/libicpf/src/mutex.cpp (.../mutex.cpp) (revision 2b72d8a437d5843db8c14f68c8aa8484614d2f5b) @@ -62,4 +62,14 @@ #endif } +bool mutex::lock(const char_t* pszFile, ulong_t ulLine, const char_t* pszFunction) +{ + return lock(); +} + +bool mutex::unlock(const char_t* pszFile, ulong_t ulLine, const char_t* pszFunction) +{ + return unlock(); +} + END_ICPF_NAMESPACE Index: ext/libicpf/src/mutex.h =================================================================== diff -u -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