+#include "execution.h"
+#include "threads-model.h"
+#include "clockvector.h"
+#include "action.h"
+
+namespace cdsc {
+
+mutex::mutex(int type)
+{
+ state.locked = NULL;
+ thread_id_t tid = thread_current_id();
+ state.alloc_tid = tid;
+ ClockVector *cv = model->get_execution()->get_cv(tid);
+ state.alloc_clock = cv == NULL ? 0 : cv->getClock(tid);