Print this page
XXXX introduce drv_sectohz
*** 65,75 ****
clock_t time;
/* Set thread timeout */
if (cfg[CFG_TIMEOUT_ENABLE].current) {
(void) drv_getparm(LBOLT, &time);
! time += (timeout * drv_usectohz(1000000));
} else {
time = -1;
}
return (time);
--- 65,75 ----
clock_t time;
/* Set thread timeout */
if (cfg[CFG_TIMEOUT_ENABLE].current) {
(void) drv_getparm(LBOLT, &time);
! time += drv_sectohz(timeout);
} else {
time = -1;
}
return (time);
*** 129,139 ****
/* If timer is still enabled, restart it */
if (!(hba->timer_flags & EMLXS_TIMER_KILL)) {
hba->timer_id =
timeout(emlxs_timer, (void *)hba,
! (EMLXS_TIMER_PERIOD * drv_usectohz(1000000)));
} else {
hba->timer_id = 0;
hba->timer_flags |= EMLXS_TIMER_ENDED;
}
--- 129,139 ----
/* If timer is still enabled, restart it */
if (!(hba->timer_flags & EMLXS_TIMER_KILL)) {
hba->timer_id =
timeout(emlxs_timer, (void *)hba,
! drv_sectohz(EMLXS_TIMER_PERIOD));
} else {
hba->timer_id = 0;
hba->timer_flags |= EMLXS_TIMER_ENDED;
}
*** 238,248 ****
/* Restart the timer */
mutex_enter(&EMLXS_TIMER_LOCK);
if (!hba->timer_id) {
hba->timer_flags = 0;
hba->timer_id =
! timeout(emlxs_timer, (void *)hba, drv_usectohz(1000000));
}
mutex_exit(&EMLXS_TIMER_LOCK);
} /* emlxs_timer_start() */
--- 238,248 ----
/* Restart the timer */
mutex_enter(&EMLXS_TIMER_LOCK);
if (!hba->timer_id) {
hba->timer_flags = 0;
hba->timer_id =
! timeout(emlxs_timer, (void *)hba, drv_sectohz(1));
}
mutex_exit(&EMLXS_TIMER_LOCK);
} /* emlxs_timer_start() */