X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=blobdiff_plain;f=model.cc;h=c713d1e1761b308cc5433dfa05345a8c23d5024a;hp=7a5edc7a1b8666ff8be384edd4e06f0e3ccc3f5e;hb=664f78de4c437f087e5d0cf0b893a95cf7c50072;hpb=a26fa96048fab9b13239e49e37ed8cf8c39583c9 diff --git a/model.cc b/model.cc index 7a5edc7..c713d1e 100644 --- a/model.cc +++ b/model.cc @@ -401,14 +401,14 @@ bool ModelChecker::is_deadlocked() const } /** - * Check if a Thread has entered a deadlock situation. This will not check - * other threads for potential deadlock situations, and may miss deadlocks - * involving WAIT. + * Check if a Thread has entered a circular wait deadlock situation. This will + * not check other threads for potential deadlock situations, and may miss + * deadlocks involving WAIT. * * @param t The thread which may have entered a deadlock * @return True if this Thread entered a deadlock; false otherwise */ -bool ModelChecker::check_deadlock(const Thread *t) const +bool ModelChecker::is_circular_wait(const Thread *t) const { for (Thread *waiting = t->waiting_on() ; waiting != NULL; waiting = waiting->waiting_on()) if (waiting == t) @@ -3052,7 +3052,7 @@ void ModelChecker::run() Thread *thr = get_thread(tid); if (!thr->is_model_thread() && !thr->is_complete() && !thr->get_pending()) { switch_from_master(thr); - if (check_deadlock(thr)) + if (is_circular_wait(thr)) assert_bug("Deadlock detected"); } }