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 cbd5617d8238f9326720fbcfb7dfb9c08864b6e3..569dd472bab4aeb908e0e1df60d50540cf607d87 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);
                                }
                        }
 
                                }
                        }