model: deadlock: print the culprit thread, when known
authorBrian Norris <banorris@uci.edu>
Thu, 4 Apr 2013 08:38:40 +0000 (01:38 -0700)
committerBrian Norris <banorris@uci.edu>
Fri, 5 Apr 2013 17:29:04 +0000 (10:29 -0700)
model.cc

index cbd5617..569dd47 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -3128,7 +3128,7 @@ void ModelChecker::run()
                                if (!thr->is_model_thread() && !thr->is_complete() && !thr->get_pending()) {
                                        switch_from_master(thr);
                                        if (thr->is_waiting_on(thr))
                                if (!thr->is_model_thread() && !thr->is_complete() && !thr->get_pending()) {
                                        switch_from_master(thr);
                                        if (thr->is_waiting_on(thr))
-                                               assert_bug("Deadlock detected");
+                                               assert_bug("Deadlock detected (thread %u)", i);
                                }
                        }
 
                                }
                        }