Lines Matching full:fsm
16 #include "fsm.h"
21 mISDN_FsmNew(struct Fsm *fsm, in mISDN_FsmNew() argument
26 fsm->jumpmatrix = in mISDN_FsmNew()
27 kzalloc(array3_size(sizeof(FSMFNPTR), fsm->state_count, in mISDN_FsmNew()
28 fsm->event_count), in mISDN_FsmNew()
30 if (fsm->jumpmatrix == NULL) in mISDN_FsmNew()
34 if ((fnlist[i].state >= fsm->state_count) || in mISDN_FsmNew()
35 (fnlist[i].event >= fsm->event_count)) { in mISDN_FsmNew()
38 i, (long)fnlist[i].state, (long)fsm->state_count, in mISDN_FsmNew()
39 (long)fnlist[i].event, (long)fsm->event_count); in mISDN_FsmNew()
41 fsm->jumpmatrix[fsm->state_count * fnlist[i].event + in mISDN_FsmNew()
48 mISDN_FsmFree(struct Fsm *fsm) in mISDN_FsmFree() argument
50 kfree((void *) fsm->jumpmatrix); in mISDN_FsmFree()
59 if ((fi->state >= fi->fsm->state_count) || in mISDN_FsmEvent()
60 (event >= fi->fsm->event_count)) { in mISDN_FsmEvent()
63 (long)fi->state, (long)fi->fsm->state_count, event, in mISDN_FsmEvent()
64 (long)fi->fsm->event_count); in mISDN_FsmEvent()
67 r = fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state]; in mISDN_FsmEvent()
71 fi->fsm->strState[fi->state], in mISDN_FsmEvent()
72 fi->fsm->strEvent[event]); in mISDN_FsmEvent()
78 fi->fsm->strState[fi->state], in mISDN_FsmEvent()
79 fi->fsm->strEvent[event]); in mISDN_FsmEvent()
91 fi->fsm->strState[newstate]); in mISDN_FsmChangeState()