init_fsm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 to fsm_node array describing this FSM. this is the blueprint, iykyk πŸ¦‹
  • tmpl_len β€” number of entries in the tmpl array. 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 πŸ’œ


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