1) more comments
[c11tester.git] / mutex.cc
index b31b20a8ed2f02446fd1c4fbea5965c65b2b6979..6ef297a594d6b897110e7663c1f3753f859e0c3a 100644 (file)
--- a/mutex.cc
+++ b/mutex.cc
@@ -1,12 +1,14 @@
 #include "mutex.h"
 #include "model.h"
-
+#include "threads.h"
+#include "clockvector.h"
 
 namespace std {
-mutex::mutex() :
-       owner(0), islocked(false)
-{
-
+mutex::mutex() {
+       state.islocked=false;
+       thread_id_t tid=thread_current()->get_id();
+       state.alloc_tid=tid;
+       state.alloc_clock=model->get_cv(tid)->getClock(tid);
 }
        
 void mutex::lock() {