version 0.1.4
[fms.git] / src / pthreadwrapper / mutex.cpp
index ca554b1..aec6561 100644 (file)
@@ -1,6 +1,10 @@
 #include "../../include/pthreadwrapper/mutex.h"\r
 #include <exception>\r
 \r
+#ifndef _WIN32\r
+       #include <sys/errno.h>\r
+#endif\r
+\r
 #ifdef XMEM\r
        #include <xmem.h>\r
 #endif\r
@@ -29,7 +33,7 @@ void Mutex::Acquire() throw(std::exception)
                // deadlock - throw exception\r
                if(rval==EDEADLK)\r
                {\r
-                       throw std::exception("Mutex would deadlock!");\r
+                       throw DeadlockException();\r
                }\r
        }\r
 }\r