3 FuncInst::FuncInst(ModelAction *act)
6 this->position = act->get_position();
7 this->location = act->get_location();
8 this->type = act->get_type();
11 FuncNode::FuncNode() :
15 void FuncNode::add_action(ModelAction *act)
19 const char * position = act->get_position();
21 /* Actions THREAD_CREATE, THREAD_START, THREAD_YIELD, THREAD_JOIN,
22 * THREAD_FINISH, PTHREAD_CREATE, PTHREAD_JOIN,
23 * ATOMIC_LOCK, ATOMIC_TRYLOCK, and ATOMIC_UNLOCK are not tagged with their
26 if (position == NULL) {
30 if ( func_insts.contains(position) ) {
31 FuncInst * inst = func_insts.get(position);
33 if (inst->get_type() != act->get_type() &&
34 inst->get_type() != ATOMIC_RMWRCAS ) {
35 model_print("action with a different type occurs at line number %s \n", position);
41 FuncInst * func_inst = new FuncInst(act);
42 func_insts.put(position, func_inst);
43 inst_list.push_back(func_inst);