X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=mutex.cc;h=0776db8eef5857b34c47bdbf3493194c9672097a;hb=0acd7ac85bd6004e53e1283a2900ffef7debeed8;hp=44f64ff764b3c0c80a2c789d4f5bfcff40a7ef1e;hpb=89ecd60fab0d93d6df6aa35e663ab67db860fa1d;p=c11tester.git diff --git a/mutex.cc b/mutex.cc index 44f64ff7..0776db8e 100644 --- a/mutex.cc +++ b/mutex.cc @@ -13,7 +13,8 @@ mutex::mutex() state.locked = NULL; thread_id_t tid = thread_current()->get_id(); state.alloc_tid = tid; - state.alloc_clock = model->get_execution()->get_cv(tid)->getClock(tid); + ClockVector *cv = model->get_execution()->get_cv(tid); + state.alloc_clock = cv == NULL ? 0 : cv->getClock(tid); } void mutex::lock()