merge
authorweiyu <weiyuluo1232@gmail.com>
Wed, 31 Jul 2019 07:52:05 +0000 (00:52 -0700)
committerweiyu <weiyuluo1232@gmail.com>
Wed, 31 Jul 2019 07:52:05 +0000 (00:52 -0700)
1  2 
cmodelint.cc
funcnode.cc
funcnode.h
history.cc
history.h
predicate.h
pthread.cc

diff --cc cmodelint.cc
Simple merge
diff --cc funcnode.cc
index abc94a5d1d9749f804c6baf3f21d79e1e50453dd,1c5d681cda0d1d65dbdc6af231d96420f4ad4464..1e08f1c508c49350fff0c7476ff55f0a3b221f34
@@@ -166,14 -177,13 +176,14 @@@ void FuncNode::print_last_read(uint32_
  {
        ASSERT(thrd_read_map.size() > tid);
        read_map_t * read_map = thrd_read_map[tid];
 -
 +/*
-       ModelList<void *>::iterator it;
-       for (it = read_locations.begin();it != read_locations.end();it++) {
-               if ( !read_map->contains(*it) )
+       mllnode<void *> * it;
+       for (it = read_locations.begin();it != NULL;it=it->getNext()) {
+               if ( !read_map->contains(it->getVal()) )
                        break;
  
-               uint64_t read_val = read_map->get(*it);
-               model_print("last read of thread %d at %p: 0x%x\n", tid, *it, read_val);
+               uint64_t read_val = read_map->get(it->getVal());
+               model_print("last read of thread %d at %p: 0x%x\n", tid, it->getVal(), read_val);
        }
 +*/
  }
diff --cc funcnode.h
index d2bc3cf2f7ae079597a5e380f7746d01015a4db1,ebd04c7f277986f1355ea91193c0d9c9967339f9..f293f1955925de7f10d0d908848bb9ef806eba8e
@@@ -54,7 -53,7 +54,7 @@@ private
  
        /* Store the values read by atomic read actions per memory location for each thread */
        ModelVector<read_map_t *> thrd_read_map;
 -      ModelList<void *> read_locations;
 +
  };
  
- #endif /* __FUNCNODE_H__ */
+ #endif        /* __FUNCNODE_H__ */
diff --cc history.cc
index a609fbf5c3d30a9c70692266e1f5a9fb8576a895,c48835340bbe5c574ffb48970d5f215e20daa78c..5af063e3756fc08de613582d90edb4f458a46b0d
@@@ -181,11 -175,12 +184,11 @@@ void ModelHistory::print_func_node(
                func_inst_list_mt * entry_insts = func_node->get_entry_insts();
                model_print("function %s has entry actions\n", func_node->get_func_name());
  
-               func_inst_list_mt::iterator it;
-               for (it = entry_insts->begin();it != entry_insts->end();it++) {
-                       FuncInst *inst = *it;
+               mllnode<FuncInst*>* it;
+               for (it = entry_insts->begin();it != NULL;it=it->getNext()) {
+                       FuncInst *inst = it->getVal();
                        model_print("type: %d, at: %s\n", inst->get_type(), inst->get_position());
                }
 -
  /*
                  func_inst_list_mt * inst_list = funcNode->get_inst_list();
  
diff --cc history.h
index f562c0f1ea30a0d04e8682f19de5fd5d4b485426,ee07f993458363041a6c30326d76ef5eb9e0af43..2edf12a8c790d95f4ef56b18812220861cec4f7b
+++ b/history.h
@@@ -45,9 -44,7 +45,9 @@@ private
        ModelVector<const char *> func_map_rev;
  
        ModelVector<FuncNode *> func_nodes;
 +
        HashTable<void *, write_set_t *, uintptr_t, 4, model_malloc, model_calloc, model_free> write_history;
 +      HashSet<void *, uintptr_t, 4, model_malloc, model_calloc, model_free> write_locations;
  };
  
- #endif /* __HISTORY_H__ */
+ #endif        /* __HISTORY_H__ */
diff --cc predicate.h
index 42511c609cb5a8907b7bda7d740047c4f3b0387d,bab7a7eee54363c01802bdf44616f0e814bb892e..3849e2d88e0e4b2c519c4bd61717597a0d53f2e3
@@@ -12,10 -5,10 +12,10 @@@ typedef enum predicate_token 
  } token_t;
  
  /* If token is EQUALITY, then the predicate asserts whether
-  * this load should read the same value as the last value 
+  * this load should read the same value as the last value
   * read at memory location specified in predicate_expr.
   */
 -struct predicate_expr {
 +struct pred_expr {
        token_t token;
        void * location;
        bool value;
diff --cc pthread.cc
Simple merge