X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=model.cc;h=7741760025162b786b48c903aaf86937bb4cb0f1;hb=db5cad55a147218984ef544439ee8a936303ddf8;hp=86289a0738a7965727fb4620a0021bbb8e2c90d0;hpb=11bd7a3e906795b46b1fd20276a28002978bf1ab;p=model-checker.git diff --git a/model.cc b/model.cc index 86289a0..7741760 100644 --- a/model.cc +++ b/model.cc @@ -927,16 +927,11 @@ bool ModelChecker::process_read(ModelAction *curr) */ bool ModelChecker::process_mutex(ModelAction *curr) { - std::mutex *mutex = NULL; + std::mutex *mutex = curr->get_mutex(); struct std::mutex_state *state = NULL; - if (curr->is_trylock() || curr->is_lock() || curr->is_unlock()) { - mutex = (std::mutex *)curr->get_location(); + if (mutex) state = mutex->get_state(); - } else if (curr->is_wait()) { - mutex = (std::mutex *)curr->get_value(); - state = mutex->get_state(); - } switch (curr->get_type()) { case ATOMIC_TRYLOCK: {