Lines Matching refs:fi
88 fsm_print_history(fsm_instance *fi)
93 if (fi->history_size >= FSM_HISTORY_SIZE)
94 idx = fi->history_index;
96 printk(KERN_DEBUG "fsm(%s): History:\n", fi->name);
97 for (i = 0; i < fi->history_size; i++) {
98 int e = fi->history[idx].event;
99 int s = fi->history[idx++].state;
103 fi->f->state_names[s]);
106 fi->f->state_names[s],
107 fi->f->event_names[e]);
109 fi->history_size = fi->history_index = 0;
113 fsm_record_history(fsm_instance *fi, int state, int event)
115 fi->history[fi->history_index].state = state;
116 fi->history[fi->history_index++].event = event;
117 fi->history_index %= FSM_HISTORY_SIZE;
118 if (fi->history_size < FSM_HISTORY_SIZE)
119 fi->history_size++;
124 fsm_getstate_str(fsm_instance *fi)
126 int st = atomic_read(&fi->state);
127 if (st >= fi->f->nr_states)
129 return fi->f->state_names[st];
138 this->fi->name, this);
140 fsm_event(this->fi, this->expire_event, this->event_arg);
144 fsm_settimer(fsm_instance *fi, fsm_timer *this)
146 this->fi = fi;
148 printk(KERN_DEBUG "fsm(%s): Create timer %p\n", fi->name,
158 printk(KERN_DEBUG "fsm(%s): Delete timer %p\n", this->fi->name,
170 this->fi->name, this, millisec);
188 this->fi->name, this, millisec);