3 FuncInst::FuncInst(ModelAction *act) :
7 this->position = act->get_position();
8 this->location = act->get_location();
9 this->type = act->get_type();
12 FuncNode::FuncNode() :
18 void FuncNode::add_action(ModelAction *act)
22 const char * position = act->get_position();
24 /* Actions THREAD_CREATE, THREAD_START, THREAD_YIELD, THREAD_JOIN,
25 * THREAD_FINISH, PTHREAD_CREATE, PTHREAD_JOIN,
26 * ATOMIC_LOCK, ATOMIC_TRYLOCK, and ATOMIC_UNLOCK are not tagged with their
29 if (position == NULL) {
33 if ( func_insts.contains(position) ) {
34 FuncInst * inst = func_insts.get(position);
36 if (inst->get_type() != act->get_type() ) {
37 model_print("action with a different type occurs at line number %s\n", position);
38 FuncInst * func_inst = inst->search_in_collision(act);
40 if (func_inst != NULL)
43 func_inst = new FuncInst(act);
44 inst->get_collisions()->push_back(func_inst);
45 inst_list.push_back(func_inst); // delete?
46 model_print("collision added\n");
52 FuncInst * func_inst = new FuncInst(act);
53 func_insts.put(position, func_inst);
55 inst_list.push_back(func_inst);