add mutex files
[c11tester.git] / mutex.h
diff --git a/mutex.h b/mutex.h
new file mode 100644 (file)
index 0000000..1c6c3f3
--- /dev/null
+++ b/mutex.h
@@ -0,0 +1,18 @@
+#ifndef MUTEX_H
+#define MUTEX_H
+#include "threads.h"
+
+namespace std {
+       class mutex {
+       public:
+               mutex();
+               ~mutex();
+               void lock();
+               bool try_lock();
+               void unlock();
+       private:
+               thread_id_t owner;
+               bool islocked;
+       };
+}
+#endif