From df2426d1671efd91afbb8606d877bdf1053cc1ac Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Tue, 2 Apr 2013 17:52:12 -0700 Subject: [PATCH] model: use get_mutex() and get_thread_operand() helpers --- model.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model.cc b/model.cc index 811d81a6..4d623611 100644 --- a/model.cc +++ b/model.cc @@ -1457,12 +1457,12 @@ void ModelChecker::thread_blocking_check_promises(Thread *blocker, Thread *waiti */ bool ModelChecker::check_action_enabled(ModelAction *curr) { if (curr->is_lock()) { - std::mutex *lock = (std::mutex *)curr->get_location(); + std::mutex *lock = curr->get_mutex(); struct std::mutex_state *state = lock->get_state(); if (state->locked) return false; } else if (curr->is_thread_join()) { - Thread *blocking = (Thread *)curr->get_location(); + Thread *blocking = curr->get_thread_operand(); if (!blocking->is_complete()) { blocking->push_wait_list(curr); thread_blocking_check_promises(blocking, get_thread(curr)); -- 2.34.1