Do not unset FuncInst locations when new executions start; check if execution numbers...
[c11tester.git] / funcinst.h
index 95d92ff3e9580921dafd10e324b5d79b51f77d0c..ae3aa09325148a58925819c977faa4d66aa3684c 100644 (file)
@@ -17,7 +17,6 @@ public:
 
        void * get_location() const { return location; }
        void set_location(void * loc) { location = loc; }
-       void unset_location() { location = NULL; }
 
        action_type get_type() const { return type; }
        memory_order get_mo() const { return order; }
@@ -37,6 +36,9 @@ public:
        bool is_single_location() { return single_location; }
        void not_single_location() { single_location = false; }
 
+       void set_execution_number(int new_number) { execution_number = new_number; }
+       int get_execution_number() { return execution_number; }
+
        void print();
 
        MEMALLOC
@@ -48,11 +50,16 @@ private:
         * location only stores the memory location when this FuncInst was constructed.
         */
        void * location;
+
+       /* NOTE: for rmw actions, func_inst and act may have different
+        * action types because of action type conversion in ModelExecution */
        action_type type;
+
        memory_order order;
        FuncNode * func_node;
 
        bool single_location;
+       int execution_number;
 
        /* Currently not in use. May remove this field later
         *
@@ -66,4 +73,3 @@ private:
 };
 
 #endif /* __FUNCINST_H__ */
-