model: release/acquire synchronization
authorBrian Norris <banorris@uci.edu>
Wed, 11 Jul 2012 18:53:07 +0000 (11:53 -0700)
committerBrian Norris <banorris@uci.edu>
Wed, 11 Jul 2012 18:53:07 +0000 (11:53 -0700)
I forgot that I had already written the ModelAction::reads_from() code, and it
was just waiting to be hooked up :)

Anyway, I haven't really tested all the synchronization yet...

model.cc

index 436ef77cf067983abf5f45d90f8c58517030c76f..07c81b9eed2108a32df8c50b87fb18c38f355d21 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -281,7 +281,8 @@ void ModelChecker::check_current_action(void)
        if (curr->is_read()) {
                const ModelAction *reads_from = curr->get_node()->get_next_read_from();
                value = reads_from->get_value();
-               curr->set_value(value);
+               /* Assign reads_from, perform release/acquire synchronization */
+               curr->read_from(reads_from);
        }
        th->set_return_value(value);
 }