Lines Matching full:machine
2 * wpa_supplicant/hostapd - State machine definitions
9 * implement a state machine. In addition to including this header file, each
10 * file implementing a state machine must define STATE_MACHINE_DATA to be the
24 * SM_STATE - Declaration of a state machine function
25 * @machine: State machine name
26 * @state: State machine state
28 * This macro is used to declare a state machine function. It is used in place
32 #define SM_STATE(machine, state) \ argument
33 static void sm_ ## machine ## _ ## state ## _Enter(STATE_MACHINE_DATA *sm, \
37 * SM_ENTRY - State machine function entry point
38 * @machine: State machine name
39 * @state: State machine state
41 * This macro is used inside each state machine function declared with
44 * information about state transition and update the state machine state.
46 #define SM_ENTRY(machine, state) \ argument
47 if (!global || sm->machine ## _state != machine ## _ ## state) { \
49 wpa_printf(MSG_DEBUG, STATE_MACHINE_DEBUG_PREFIX ": " #machine \
52 sm->machine ## _state = machine ## _ ## state;
55 * SM_ENTRY_M - State machine function entry point for state machine group
56 * @machine: State machine name
57 * @_state: State machine state
60 * This macro is like SM_ENTRY, but for state machine groups that use a shared
61 * data structure for more than one state machine. Both machine and prefix
62 * parameters are set to "sub-state machine" name. prefix is used to allow more
65 #define SM_ENTRY_M(machine, _state, data) \ argument
66 if (!global || sm->data ## _ ## state != machine ## _ ## _state) { \
69 #machine " entering state " #_state); \
71 sm->data ## _ ## state = machine ## _ ## _state;
74 * SM_ENTRY_MA - State machine function entry point for state machine group
75 * @machine: State machine name
76 * @_state: State machine state
83 #define SM_ENTRY_MA(machine, _state, data) \ argument
84 if (!global || sm->data ## _ ## state != machine ## _ ## _state) { \
87 #machine " entering state " #_state, \
90 sm->data ## _ ## state = machine ## _ ## _state;
93 * SM_ENTER - Enter a new state machine state
94 * @machine: State machine name
95 * @state: State machine state
97 * This macro expands to a function call to a state machine function defined
98 * with SM_STATE macro. SM_ENTER is used in a state machine step function to
99 * move the state machine to a new state.
101 #define SM_ENTER(machine, state) \ argument
102 sm_ ## machine ## _ ## state ## _Enter(sm, 0)
105 * SM_ENTER_GLOBAL - Enter a new state machine state based on global rule
106 * @machine: State machine name
107 * @state: State machine state
112 * rule is forcing a state machine to remain in on state.
114 #define SM_ENTER_GLOBAL(machine, state) \ argument
115 sm_ ## machine ## _ ## state ## _Enter(sm, 1)
118 * SM_STEP - Declaration of a state machine step function
119 * @machine: State machine name
121 * This macro is used to declare a state machine step function. It is used in
123 * state machine to a new state based on state variables. This function uses
126 #define SM_STEP(machine) \ argument
127 static void sm_ ## machine ## _Step(STATE_MACHINE_DATA *sm)
130 * SM_STEP_RUN - Call the state machine step function
131 * @machine: State machine name
133 * This macro expands to a function call to a state machine step function
136 #define SM_STEP_RUN(machine) sm_ ## machine ## _Step(sm) argument