towards supporting scanalysis...
[c11tester.git] / model.cc
index 0f2f0366ebf136f448965c2d5449e317b199ca30..23efa8f77566d10752f5d4f7e8c6c70f73aff55d 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -151,6 +151,18 @@ static SnapVector<action_list_t> * get_safe_ptr_vect_action(HashTable<void *, Sn
        return tmp;
 }
 
+action_list_t * ModelChecker::get_actions_on_obj(void * obj, thread_id_t tid) {
+       SnapVector<action_list_t> *wrv=obj_thrd_map->get(obj);
+       if (wrv==NULL)
+               return NULL;
+       unsigned int thread=id_to_int(tid);
+       if (thread < wrv->size())
+               return &(*wrv)[thread];
+       else
+               return NULL;
+}
+
+
 /**
  * Restores user program to initial state and resets all model-checker data
  * structures.