Fix snapshot code
[model-checker.git] / mutex.cc
index 0bb627d293b03a27d29673b3a95b1b3e136093c2..d5ec40fff402df19093d68975c8a8914c0fa7567 100644 (file)
--- a/mutex.cc
+++ b/mutex.cc
@@ -1,6 +1,7 @@
 #include <mutex>
 
 #include "model.h"
+#include "execution.h"
 #include "threads-model.h"
 #include "clockvector.h"
 #include "action.h"
@@ -9,10 +10,10 @@ namespace std {
 
 mutex::mutex()
 {
-       state.islocked = false;
+       state.locked = NULL;
        thread_id_t tid = thread_current()->get_id();
        state.alloc_tid = tid;
-       state.alloc_clock = model->get_cv(tid)->getClock(tid);
+       state.alloc_clock = model->get_execution()->get_cv(tid)->getClock(tid);
 }
        
 void mutex::lock()