Lines Matching refs:fi
85 fsm_print_history(fsm_instance *fi) in fsm_print_history() argument
90 if (fi->history_size >= FSM_HISTORY_SIZE) in fsm_print_history()
91 idx = fi->history_index; in fsm_print_history()
93 printk(KERN_DEBUG "fsm(%s): History:\n", fi->name); in fsm_print_history()
94 for (i = 0; i < fi->history_size; i++) { in fsm_print_history()
95 int e = fi->history[idx].event; in fsm_print_history()
96 int s = fi->history[idx++].state; in fsm_print_history()
100 fi->f->state_names[s]); in fsm_print_history()
103 fi->f->state_names[s], in fsm_print_history()
104 fi->f->event_names[e]); in fsm_print_history()
106 fi->history_size = fi->history_index = 0; in fsm_print_history()
110 fsm_record_history(fsm_instance *fi, int state, int event) in fsm_record_history() argument
112 fi->history[fi->history_index].state = state; in fsm_record_history()
113 fi->history[fi->history_index++].event = event; in fsm_record_history()
114 fi->history_index %= FSM_HISTORY_SIZE; in fsm_record_history()
115 if (fi->history_size < FSM_HISTORY_SIZE) in fsm_record_history()
116 fi->history_size++; in fsm_record_history()
121 fsm_getstate_str(fsm_instance *fi) in fsm_getstate_str() argument
123 int st = atomic_read(&fi->state); in fsm_getstate_str()
124 if (st >= fi->f->nr_states) in fsm_getstate_str()
126 return fi->f->state_names[st]; in fsm_getstate_str()
134 this->fi->name, this); in fsm_expire_timer()
136 fsm_event(this->fi, this->expire_event, this->event_arg); in fsm_expire_timer()
140 fsm_settimer(fsm_instance *fi, fsm_timer *this) in fsm_settimer() argument
142 this->fi = fi; in fsm_settimer()
146 printk(KERN_DEBUG "fsm(%s): Create timer %p\n", fi->name, in fsm_settimer()
156 printk(KERN_DEBUG "fsm(%s): Delete timer %p\n", this->fi->name, in fsm_deltimer()
168 this->fi->name, this, millisec); in fsm_addtimer()
188 this->fi->name, this, millisec); in fsm_modtimer()