add entry atomic instructions to FuncNode
[c11tester.git] / funcinst.h
index 3f2307e17c9e01fd5c7aa4ba635e24234da7c850..6cb8c1a1510ac7df84ca76f6d2fce05a91297592 100644 (file)
@@ -7,13 +7,14 @@ typedef ModelList<FuncInst *> func_inst_list_mt;
 
 class FuncInst {
 public:
-       FuncInst(ModelAction *act);
+       FuncInst(ModelAction *act, FuncNode *func_node);
        ~FuncInst();
 
        //ModelAction * get_action() const { return action; }
        const char * get_position() const { return position; }
        void * get_location() const { return location; }
        action_type get_type() const { return type; }
+       FuncNode * get_func_node() const { return func_node; }
 
        bool add_pred(FuncInst * other);
        bool add_succ(FuncInst * other);
@@ -28,10 +29,15 @@ public:
 private:
        //ModelAction * const action;
        const char * position;
-       void *location;
+       void * location;
        action_type type;
+       FuncNode * func_node;
 
+       /* collisions store a list of FuncInsts with the same position
+        * but different action types. For example, CAS is broken down
+        * as three different atomic operations in cmodelint.cc */
        func_inst_list_mt collisions;
+
        func_inst_list_mt predecessors;
        func_inst_list_mt successors;
 };