4 #include "threads-model.h"
5 #include "clockvector.h"
13 thread_id_t tid = thread_current()->get_id();
14 state.alloc_tid = tid;
15 state.alloc_clock = model->get_cv(tid)->getClock(tid);
20 model->switch_to_master(new ModelAction(ATOMIC_LOCK, std::memory_order_seq_cst, this));
23 bool mutex::try_lock()
25 return model->switch_to_master(new ModelAction(ATOMIC_TRYLOCK, std::memory_order_seq_cst, this));
30 model->switch_to_master(new ModelAction(ATOMIC_UNLOCK, std::memory_order_seq_cst, this));