version 0.1.3
[fms.git] / include / pthreadwrapper / mutex.h
diff --git a/include/pthreadwrapper/mutex.h b/include/pthreadwrapper/mutex.h
new file mode 100644 (file)
index 0000000..44e9085
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef _pthread_mutex_\r
+#define _pthread_mutex_\r
+\r
+#include <pthread.h>\r
+#include <exception>\r
+\r
+namespace PThread\r
+{\r
+\r
+class Mutex\r
+{\r
+public:\r
+       Mutex();\r
+       ~Mutex();\r
+\r
+       void Acquire() throw(std::exception);\r
+       void Release();\r
+\r
+private:\r
+       pthread_mutex_t m_mutex;\r
+       pthread_mutexattr_t m_attr;\r
+};\r
+\r
+}      // namespace\r
+\r
+#endif // _pthread_mutex_\r