model: disabled threads are "future ordered"
authorBrian Norris <banorris@uci.edu>
Sun, 7 Oct 2012 22:04:08 +0000 (15:04 -0700)
committerBrian Norris <banorris@uci.edu>
Sun, 7 Oct 2012 22:26:48 +0000 (15:26 -0700)
If a Thread is not currently enabled, then it will synchronize with
another (currently-enabled) Thread if/when it wakes up. Thus, it
qualifies as "future ordered" within the release sequence code: it
cannot contribute future writes that will break current pending release
sequences.

model.cc

index 2260431ab908973fe5b4233e9e15ceeb8be4ca2f..6eaf65606b6fbfb96f79946836bfae5da2db7b2c 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -1258,8 +1258,10 @@ bool ModelChecker::release_seq_heads(const ModelAction *rf,
                bool future_ordered = false;
 
                ModelAction *last = get_last_action(int_to_id(i));
-               if (last && (rf->happens_before(last) ||
-                               get_thread(int_to_id(i))->is_complete()))
+               Thread *th = get_thread(int_to_id(i));
+               if ((last && rf->happens_before(last)) ||
+                               !scheduler->is_enabled(th) ||
+                               th->is_complete())
                        future_ordered = true;
 
                for (rit = list->rbegin(); rit != list->rend(); rit++) {