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
20 if (position == NULL) {
24 if ( func_insts.contains(position) ) {
25 FuncInst * inst = func_insts.get(position);
27 if (inst->get_type() != act->get_type() ) {
28 // model_print("action with a different type occurs at line number %s\n", position);
29 FuncInst * func_inst = inst->search_in_collision(act);
31 if (func_inst != NULL) {
32 // return the FuncInst found in the collision list
36 func_inst = new FuncInst(act);
37 inst->get_collisions()->push_back(func_inst);
38 inst_list.push_back(func_inst); // delete?
39 // model_print("collision added\n");
47 FuncInst * func_inst = new FuncInst(act);
48 func_insts.put(position, func_inst);
50 inst_list.push_back(func_inst);