Lines Matching full:fi
89 fsm_print_history(fsm_instance *fi) in fsm_print_history() argument
94 if (fi->history_size >= FSM_HISTORY_SIZE) in fsm_print_history()
95 idx = fi->history_index; in fsm_print_history()
97 printk(KERN_DEBUG "fsm(%s): History:\n", fi->name); in fsm_print_history()
98 for (i = 0; i < fi->history_size; i++) { in fsm_print_history()
99 int e = fi->history[idx].event; in fsm_print_history()
100 int s = fi->history[idx++].state; in fsm_print_history()
104 fi->f->state_names[s]); in fsm_print_history()
107 fi->f->state_names[s], in fsm_print_history()
108 fi->f->event_names[e]); in fsm_print_history()
110 fi->history_size = fi->history_index = 0; in fsm_print_history()
114 fsm_record_history(fsm_instance *fi, int state, int event) in fsm_record_history() argument
116 fi->history[fi->history_index].state = state; in fsm_record_history()
117 fi->history[fi->history_index++].event = event; in fsm_record_history()
118 fi->history_index %= FSM_HISTORY_SIZE; in fsm_record_history()
119 if (fi->history_size < FSM_HISTORY_SIZE) in fsm_record_history()
120 fi->history_size++; in fsm_record_history()
125 fsm_getstate_str(fsm_instance *fi) in fsm_getstate_str() argument
127 int st = atomic_read(&fi->state); in fsm_getstate_str()
128 if (st >= fi->f->nr_states) in fsm_getstate_str()
130 return fi->f->state_names[st]; in fsm_getstate_str()
139 this->fi->name, this); in fsm_expire_timer()
141 fsm_event(this->fi, this->expire_event, this->event_arg); in fsm_expire_timer()
145 fsm_settimer(fsm_instance *fi, fsm_timer *this) in fsm_settimer() argument
147 this->fi = fi; in fsm_settimer()
149 printk(KERN_DEBUG "fsm(%s): Create timer %p\n", fi->name, in fsm_settimer()
159 printk(KERN_DEBUG "fsm(%s): Delete timer %p\n", this->fi->name, in fsm_deltimer()
171 this->fi->name, this, millisec); in fsm_addtimer()
189 this->fi->name, this, millisec); in fsm_modtimer()