FreeBSD/sys/dev/isci/scil/sci_base_state_machine.c
/**
 * @brief This method performs an update to the current state of
 *        the state machine.
 *
 * @param[in] this_state_machine This parameter specifies the state machine
 *            for which the caller wishes to perform a state change.
 * @param[in] next_state This parameter specifies the new state for the
 *            state machine.
 *
 * @return none
 */
@brief This method performs an update to the current state of
the state machine.

@param[in] this_state_machine This parameter specifies the state machine
for which the caller wishes to perform a state change.
@param[in] next_state This parameter specifies the new state for the
state machine.

@return none
@brief This method performs an update to the current state of the state machine . @param [ in ] this_state_machine This parameter specifies the state machine for which the caller wishes to perform a state change . @param [ in ] next_state This parameter specifies the new state for the state machine . @return none
void sci_base_state_machine_change_state(
   SCI_BASE_STATE_MACHINE_T *this_state_machine,
   U32   next_state
)
{
   SCI_STATE_MACHINE_EXIT_STATE(this_state_machine);
   this_state_machine->previous_state_id = this_state_machine->current_state_id;
   SCI_STATE_MACHINE_SET_STATE(this_state_machine, next_state);
#if defined(SCI_BASE_ENABLE_SUBJECT_NOTIFICATION)
   sci_base_subject_notify(&this_state_machine->parent);
#endif
   SCI_STATE_MACHINE_ENTER_STATE(this_state_machine);
}
void sci_base_state_machine_change_state ( SCI_BASE_STATE_MACHINE_T * this_state_machine , U32 next_state ) { SCI_STATE_MACHINE_EXIT_STATE ( this_state_machine ) ; this_state_machine -> previous_state_id = this_state_machine -> current_state_id ; SCI_STATE_MACHINE_SET_STATE ( this_state_machine , next_state ) ; #if defined ( SCI_BASE_ENABLE_SUBJECT_NOTIFICATION ) sci_base_subject_notify ( & this_state_machine -> parent ) ; #endif SCI_STATE_MACHINE_ENTER_STATE ( this_state_machine ) ; }
@brief This method performs an update to the current state of
        the state machine.
@brief This method performs an update to the current state of the state machine .
// Notify of the state change prior to entering the state.