init_fsm(9)
π init_fsm(9) β Kernel API Manual π
okay bestie, welcome to the init_fsm(9) page β yes, that's the manual name, and we're in Kernel API Manual territory β¨. This is the whole "make a finite state machine happen" situation, and it's lowkey iconic π
.
π NAME π
init_fsm β creates a finite state machine. literally the glow-up moment for your states and events, no cap π
β¨ SYNOPSIS β¨
fsm_instance * init_fsm (char *name , const char **state_names , const
char **event_names , int nr_states , int nr_events , const fsm_node
*tmpl , int tmpl_len , gfp_t order );
π«Ά ARGUMENTS π«Ά
nameβ name of this instance, for logging purposes. give your FSM a name, bestie π·οΈstate_namesβ array of names for all states, for logging purposes. every state gets a lil label β¨event_namesβ array of names for all events, for logging purposes. same energy for events πnr_statesβ number of states for this instance. count 'em πnr_eventsβ number of events for this instance. count those too πtmplβ pointer tofsm_nodearray describing this FSM. this is the blueprint, iykyk π¦tmpl_lenβ number of entries in thetmplarray. how many blueprint rows we're working with πorderβ GFP flags for memory allocation (e.g.GFP_KERNEL). memory allocation vibes, literally π
π¦ DESCRIPTION π¦
okay so this function allocates and initializes a finite state machine instance with the specified states, events, and transition table. that's the whole assignment, and it ate π β¨
πΈ RETURN πΈ
Returns a pointer to the initialized FSM instance, or NULL on failure. NULL means failure, periodt ππ«Ά
π SEE ALSO π
- the kernel file
./drivers/s390/net/fsm.hβ go look at the source, bestie π kfree_fsm(9)fsm_event(9)fsm_newstate(9)fsm_getstate(9)fsm_getstate_str(9)fsm_settimer(9)fsm_deltimer(9)fsm_addtimer(9)fsm_modtimer(9)
mwah π this page comes from ./drivers/s390/net, dated October 2026, and it's the init_fsm(9) manual page. byeee π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms