Lines Matching refs:fsm
25 FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount) in FsmNew() argument
29 fsm->jumpmatrix = in FsmNew()
30 kzalloc(sizeof(FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL); in FsmNew()
31 if (!fsm->jumpmatrix) in FsmNew()
35 if ((fnlist[i].state >= fsm->state_count) || (fnlist[i].event >= fsm->event_count)) { in FsmNew()
37 i, (long)fnlist[i].state, (long)fsm->state_count, in FsmNew()
38 (long)fnlist[i].event, (long)fsm->event_count); in FsmNew()
40 fsm->jumpmatrix[fsm->state_count * fnlist[i].event + in FsmNew()
46 FsmFree(struct Fsm *fsm) in FsmFree() argument
48 kfree((void *) fsm->jumpmatrix); in FsmFree()
56 if ((fi->state >= fi->fsm->state_count) || (event >= fi->fsm->event_count)) { in FsmEvent()
58 (long)fi->state, (long)fi->fsm->state_count, event, (long)fi->fsm->event_count); in FsmEvent()
61 r = fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state]; in FsmEvent()
65 fi->fsm->strState[fi->state], in FsmEvent()
66 fi->fsm->strEvent[event]); in FsmEvent()
72 fi->fsm->strState[fi->state], in FsmEvent()
73 fi->fsm->strEvent[event]); in FsmEvent()
84 fi->fsm->strState[newstate]); in FsmChangeState()