Avoid using a HashTable to associate FuncInsts with ModelActions; a slight improvemen...
[c11tester.git] / funcinst.h
index 9aec00f6cc3ae74880c4fc3af6a47cec5df28dd3..fe4adb48313abb87ca5418628c6107c418183812 100644 (file)
@@ -17,7 +17,6 @@ public:
 
        void * get_location() const { return location; }
        void set_location(void * loc) { location = loc; }
-       void reset_location() { location = NULL; }
 
        action_type get_type() const { return type; }
        memory_order get_mo() const { return order; }
@@ -37,6 +36,12 @@ 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 set_associated_act(ModelAction * act, uint32_t marker);
+       ModelAction * get_associated_act(uint32_t marker);
+
        void print();
 
        MEMALLOC
@@ -48,11 +53,19 @@ 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;
+
+       ModelAction * associated_act;
+       uint32_t marker;
 
        /* Currently not in use. May remove this field later
         *
@@ -66,4 +79,3 @@ private:
 };
 
 #endif /* __FUNCINST_H__ */
-