Print this page
XXXX introduce drv_sectohz

*** 454,464 **** return (EINVAL); } tsp->intvl = intvl; tsp->tid = realtime_timeout(xcalwd_timeout, (void *)(uintptr_t)instance, ! drv_usectohz(1000000) * tsp->intvl); tsp->started = B_TRUE; mutex_exit(&tsp->lock); return (0); case XCALWD_KEEPALIVE: tid = 0; --- 454,464 ---- return (EINVAL); } tsp->intvl = intvl; tsp->tid = realtime_timeout(xcalwd_timeout, (void *)(uintptr_t)instance, ! drv_sectohz(tsp->intvl)); tsp->started = B_TRUE; mutex_exit(&tsp->lock); return (0); case XCALWD_KEEPALIVE: tid = 0;
*** 471,481 **** mutex_enter(&tsp->lock); if (tsp->started == B_TRUE) /* reinstate */ tsp->tid = realtime_timeout(xcalwd_timeout, (void *)(uintptr_t)instance, ! drv_usectohz(1000000) * tsp->intvl); mutex_exit(&tsp->lock); return (0); case XCALWD_GETSTATE: mutex_enter(&tsp->lock); curstate = tsp->started; --- 471,481 ---- mutex_enter(&tsp->lock); if (tsp->started == B_TRUE) /* reinstate */ tsp->tid = realtime_timeout(xcalwd_timeout, (void *)(uintptr_t)instance, ! drv_sectohz(tsp->intvl)); mutex_exit(&tsp->lock); return (0); case XCALWD_GETSTATE: mutex_enter(&tsp->lock); curstate = tsp->started;