Lines Matching refs:fi
90 fsm_instance *fi; member
119 extern void kfree_fsm(fsm_instance *fi);
123 fsm_print_history(fsm_instance *fi);
126 fsm_record_history(fsm_instance *fi, int state, int event);
143 fsm_event(fsm_instance *fi, int event, void *arg) in fsm_event() argument
146 int state = atomic_read(&fi->state); in fsm_event()
148 if ((state >= fi->f->nr_states) || in fsm_event()
149 (event >= fi->f->nr_events) ) { in fsm_event()
151 fi->name, (long)state,(long)fi->f->nr_states, event, in fsm_event()
152 (long)fi->f->nr_events); in fsm_event()
154 fsm_print_history(fi); in fsm_event()
158 r = fi->f->jumpmatrix[fi->f->nr_states * event + state]; in fsm_event()
162 fi->name, fi->f->state_names[state], in fsm_event()
163 fi->f->event_names[event]); in fsm_event()
166 fsm_record_history(fi, state, event); in fsm_event()
168 r(fi, event, arg); in fsm_event()
173 fi->name, fi->f->event_names[event], in fsm_event()
174 fi->f->state_names[state]); in fsm_event()
177 fsm_print_history(fi); in fsm_event()
191 fsm_newstate(fsm_instance *fi, int newstate) in fsm_newstate() argument
193 atomic_set(&fi->state,newstate); in fsm_newstate()
195 fsm_record_history(fi, newstate, -1); in fsm_newstate()
198 printk(KERN_DEBUG "fsm(%s): New state %s\n", fi->name, in fsm_newstate()
199 fi->f->state_names[newstate]); in fsm_newstate()
201 wake_up(&fi->wait_q); in fsm_newstate()
212 fsm_getstate(fsm_instance *fi) in fsm_getstate() argument
214 return atomic_read(&fi->state); in fsm_getstate()
224 extern const char *fsm_getstate_str(fsm_instance *fi);
233 extern void fsm_settimer(fsm_instance *fi, fsm_timer *);