promise: get reference to ModelExecution
[model-checker.git] / execution.cc
index 0006c66c70a3acf89433bfd4013e03ad3f5b3e1c..0ec13900b4e56b4bde68db8978bd9d5202b28946 100644 (file)
@@ -128,7 +128,8 @@ static SnapVector<action_list_t> * get_safe_ptr_vect_action(HashTable<void *, Sn
        return tmp;
 }
 
-action_list_t * ModelExecution::get_actions_on_obj(void * obj, thread_id_t tid) {
+action_list_t * ModelExecution::get_actions_on_obj(void * obj, thread_id_t tid) const
+{
        SnapVector<action_list_t> *wrv=obj_thrd_map->get(obj);
        if (wrv==NULL)
                return NULL;
@@ -615,7 +616,7 @@ bool ModelExecution::process_read(ModelAction *curr)
                case READ_FROM_FUTURE: {
                        /* Read from future value */
                        struct future_value fv = node->get_future_value();
-                       Promise *promise = new Promise(curr, fv);
+                       Promise *promise = new Promise(this, curr, fv);
                        curr->set_read_from_promise(promise);
                        promises->push_back(promise);
                        mo_graph->startChanges();