Index: ext/libicpf/src/mutex.cpp =================================================================== diff -u -r28813ed68056ed023817951c1854bd73cc7d9e27 -r474d770b00b0605bd50dec176b614ac28a0cd053 --- ext/libicpf/src/mutex.cpp (.../mutex.cpp) (revision 28813ed68056ed023817951c1854bd73cc7d9e27) +++ ext/libicpf/src/mutex.cpp (.../mutex.cpp) (revision 474d770b00b0605bd50dec176b614ac28a0cd053) @@ -17,6 +17,21 @@ #endif } +mutex::mutex(const char_t* /*pszStr*/) +{ +#ifdef _WIN32 + ::InitializeCriticalSection(&m_cs); +#else + pthread_mutexattr_t mta; + pthread_mutexattr_init(&mta); +//#warning Recursive mutexes are disabled; Make sure you use them the right way. + pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE_NP); + pthread_mutex_init(&m_mutex, &mta); + + pthread_mutexattr_destroy(&mta); +#endif +} + mutex::~mutex() { #ifdef _WIN32 Index: ext/libicpf/src/mutex.h =================================================================== diff -u -r28813ed68056ed023817951c1854bd73cc7d9e27 -r474d770b00b0605bd50dec176b614ac28a0cd053 --- ext/libicpf/src/mutex.h (.../mutex.h) (revision 28813ed68056ed023817951c1854bd73cc7d9e27) +++ ext/libicpf/src/mutex.h (.../mutex.h) (revision 474d770b00b0605bd50dec176b614ac28a0cd053) @@ -34,6 +34,8 @@ BEGIN_ICPF_NAMESPACE +//class dumpctx; + /** \brief Class provides the locking and unlocking capabilities for use with threads. * * Class is a simple wrapper over the system related thread locking functions. In linux @@ -48,6 +50,7 @@ /** \brief Standard constructor */ mutex(); + mutex(const char_t* pszStr); /** \brief Standard destructor */