action: reword comments
[model-checker.git] / mutex.h
diff --git a/mutex.h b/mutex.h
index 1c6c3f3624fc1f9f31b4fa8331a756ea1eebee34..828aae53f9e1d273900b776ab657907c87e3cd08 100644 (file)
--- a/mutex.h
+++ b/mutex.h
@@ -1,8 +1,15 @@
 #ifndef MUTEX_H
 #define MUTEX_H
 #include "threads.h"
+#include "clockvector.h"
 
 namespace std {
+       struct mutex_state {
+               bool islocked;
+               thread_id_t alloc_tid;
+               modelclock_t alloc_clock;
+       };
+
        class mutex {
        public:
                mutex();
@@ -10,9 +17,10 @@ namespace std {
                void lock();
                bool try_lock();
                void unlock();
+               struct mutex_state * get_state() {return &state;}
+               
        private:
-               thread_id_t owner;
-               bool islocked;
+               struct mutex_state state;
        };
 }
 #endif