Lines Matching refs:fi
91 fsm_instance *fi; member
120 extern void kfree_fsm(fsm_instance *fi);
124 fsm_print_history(fsm_instance *fi);
127 fsm_record_history(fsm_instance *fi, int state, int event);
144 fsm_event(fsm_instance *fi, int event, void *arg) in fsm_event() argument
147 int state = atomic_read(&fi->state); in fsm_event()
149 if ((state >= fi->f->nr_states) || in fsm_event()
150 (event >= fi->f->nr_events) ) { in fsm_event()
152 fi->name, (long)state,(long)fi->f->nr_states, event, in fsm_event()
153 (long)fi->f->nr_events); in fsm_event()
155 fsm_print_history(fi); in fsm_event()
159 r = fi->f->jumpmatrix[fi->f->nr_states * event + state]; in fsm_event()
163 fi->name, fi->f->state_names[state], in fsm_event()
164 fi->f->event_names[event]); in fsm_event()
167 fsm_record_history(fi, state, event); in fsm_event()
169 r(fi, event, arg); in fsm_event()
174 fi->name, fi->f->event_names[event], in fsm_event()
175 fi->f->state_names[state]); in fsm_event()
178 fsm_print_history(fi); in fsm_event()
192 fsm_newstate(fsm_instance *fi, int newstate) in fsm_newstate() argument
194 atomic_set(&fi->state,newstate); in fsm_newstate()
196 fsm_record_history(fi, newstate, -1); in fsm_newstate()
199 printk(KERN_DEBUG "fsm(%s): New state %s\n", fi->name, in fsm_newstate()
200 fi->f->state_names[newstate]); in fsm_newstate()
202 wake_up(&fi->wait_q); in fsm_newstate()
213 fsm_getstate(fsm_instance *fi) in fsm_getstate() argument
215 return atomic_read(&fi->state); in fsm_getstate()
225 extern const char *fsm_getstate_str(fsm_instance *fi);
234 extern void fsm_settimer(fsm_instance *fi, fsm_timer *);