change the namespace of mutex from std to cdsc
[c11tester.git] / mutex.cc
index 0bb627d293b03a27d29673b3a95b1b3e136093c2..a431321e1aba9a11e1d7f56a630978d453ce3d6a 100644 (file)
--- a/mutex.cc
+++ b/mutex.cc
@@ -1,18 +1,19 @@
-#include <mutex>
+#include "mutex.h"
 
 #include "model.h"
+#include "execution.h"
 #include "threads-model.h"
 #include "clockvector.h"
 #include "action.h"
 
-namespace std {
+namespace cdsc {
 
 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()