promise: rename increment_threads() -> eliminate_thread()
[model-checker.git] / model.cc
index 97df9a2dbba274857e85e6be417489c776e82024..e46d36d76c3d3ede34cca70c32d562be3a327b0e 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -738,7 +738,7 @@ bool ModelChecker::process_read(ModelAction *curr, bool second_part_of_rmw)
                        struct future_value fv = curr->get_node()->get_future_value();
                        value = fv.value;
                        curr->set_read_from(NULL);
-                       Promise *valuepromise = new Promise(curr, value, fv.expiration);
+                       Promise *valuepromise = new Promise(curr, fv);
                        promises->push_back(valuepromise);
                }
                get_thread(curr)->set_return_value(value);
@@ -2379,7 +2379,7 @@ void ModelChecker::check_promises(thread_id_t tid, ClockVector *old_cv, ClockVec
                const ModelAction *act = promise->get_action();
                if ((old_cv == NULL || !old_cv->synchronized_since(act)) &&
                                merge_cv->synchronized_since(act)) {
-                       if (promise->increment_threads(tid)) {
+                       if (promise->eliminate_thread(tid)) {
                                //Promise has failed
                                priv->failed_promise = true;
                                return;
@@ -2462,7 +2462,7 @@ void ModelChecker::mo_check_promises(thread_id_t tid, const ModelAction *write,
                        continue;
 
                if (promise->get_write() && mo_graph->checkReachable(promise->get_write(), write)) {
-                       if (promise->increment_threads(tid)) {
+                       if (promise->eliminate_thread(tid)) {
                                priv->failed_promise = true;
                                return;
                        }