9 FuncInst * FuncNode::get_or_add_action(ModelAction *act)
13 const char * position = act->get_position();
15 /* Actions THREAD_CREATE, THREAD_START, THREAD_YIELD, THREAD_JOIN,
16 * THREAD_FINISH, PTHREAD_CREATE, PTHREAD_JOIN,
17 * ATOMIC_LOCK, ATOMIC_TRYLOCK, and ATOMIC_UNLOCK are not tagged with their
23 if ( func_insts.contains(position) ) {
24 FuncInst * inst = func_insts.get(position);
26 if (inst->get_type() != act->get_type() ) {
27 // model_print("action with a different type occurs at line number %s\n", position);
28 FuncInst * func_inst = inst->search_in_collision(act);
30 if (func_inst != NULL) {
31 // return the FuncInst found in the collision list
35 func_inst = new FuncInst(act, this);
36 inst->get_collisions()->push_back(func_inst);
37 inst_list.push_back(func_inst); // delete?
38 // model_print("collision added\n");
46 FuncInst * func_inst = new FuncInst(act, this);
47 func_insts.put(position, func_inst);
49 inst_list.push_back(func_inst);
53 void FuncNode::add_entry_inst(FuncInst * inst)
58 func_inst_list_mt::iterator it;
59 for (it = entry_insts.begin(); it != entry_insts.end(); it++) {
64 entry_insts.push_back(inst);