FreeBSD/sys/dev/isci/isci_timer.c
/**
 * @brief This callback method asks the user to start the supplied timer.
 *
 * @warning All timers in the system started by the SCI Framework are one
 *          shot timers.  Therefore, the SCI user should make sure that it
 *          removes the timer from it's list when a timer actually fires.
 *          Additionally, SCI Framework user's should be able to handle
 *          calls from the SCI Framework to stop a timer that may already
 *          be stopped.
 *
 * @param[in]  controller This parameter specifies the controller with
 *             which this timer is to associated.
 * @param[in]  timer This parameter specifies the timer to be started.
 * @param[in]  milliseconds This parameter specifies the number of
 *             milliseconds for which to stall.  The operating system driver
 *             is allowed to round this value up where necessary.
 *
 * @return none
 */
@brief This callback method asks the user to start the supplied timer.
@warning All timers in the system started by the SCI Framework are one
shot timers.  Therefore, the SCI user should make sure that it
removes the timer from it's list when a timer actually fires.
Additionally, SCI Framework user's should be able to handle
calls from the SCI Framework to stop a timer that may already
be stopped.

@param[in]  controller This parameter specifies the controller with
which this timer is to associated.
@param[in]  timer This parameter specifies the timer to be started.
@param[in]  milliseconds This parameter specifies the number of
milliseconds for which to stall.  The operating system driver
is allowed to round this value up where necessary.

@return none
@brief This callback method asks the user to start the supplied timer . @warning All timers in the system started by the SCI Framework are one shot timers . Therefore the SCI user should make sure that it removes the timer from it ' s list when a timer actually fires . Additionally SCI Framework user ' s should be able to handle calls from the SCI Framework to stop a timer that may already be stopped . @param [ in ] controller This parameter specifies the controller with which this timer is to associated . @param [ in ] timer This parameter specifies the timer to be started . @param [ in ] milliseconds This parameter specifies the number of milliseconds for which to stall . The operating system driver is allowed to round this value up where necessary . @return none
void
scif_cb_timer_start(SCI_CONTROLLER_HANDLE_T controller, void *timer,
    uint32_t milliseconds)
{
	struct ISCI_TIMER *isci_timer = (struct ISCI_TIMER *)timer;
	isci_timer->is_started = TRUE;
	isci_log_message(3, "TIMER", "start %p %d\n", timer, milliseconds);
	callout_reset_sbt(&isci_timer->callout, SBT_1MS * milliseconds, 0,
	    isci_timer_timeout, timer, 0);
}
void scif_cb_timer_start ( SCI_CONTROLLER_HANDLE_T controller , void * timer , uint32_t milliseconds ) { struct ISCI_TIMER * isci_timer = ( struct ISCI_TIMER * ) timer ; isci_timer -> is_started = TRUE ; isci_log_message ( 3 , " " , " \n " , timer , milliseconds ) ; callout_reset_sbt ( & isci_timer -> callout , SBT_1MS * milliseconds , 0 , isci_timer_timeout , timer , 0 ) ; }
@brief This callback method asks the user to start the supplied timer.
@brief This callback method asks the user to start the supplied timer .