Lines Matching defs:tmrp
46 static void ghd_timeout_disable(tmr_t *tmrp);
47 static void ghd_timeout_enable(tmr_t *tmrp);
242 tmr_t *tmrp = (tmr_t *)arg;
255 mutex_enter(&tmrp->t_mutex);
256 if ((cccp = tmrp->t_ccc_listp) == NULL) {
257 mutex_exit(&tmrp->t_mutex);
295 if (resched > tmrp->t_ticks)
296 resched = tmrp->t_ticks;
299 tmrp->t_timeout_id = timeout(ghd_timeout, (void *)tmrp, resched);
301 mutex_exit(&tmrp->t_mutex);
705 ghd_timeout_enable(tmr_t *tmrp)
708 if (tmrp->t_refs++ == 0) {
710 tmrp->t_timeout_id = timeout(ghd_timeout, (void *)tmrp,
711 tmrp->t_ticks);
717 ghd_timeout_disable(tmr_t *tmrp)
719 ASSERT(tmrp != NULL);
722 if (tmrp->t_refs-- <= 1) {
723 (void) untimeout(tmrp->t_timeout_id);
734 ghd_timer_init(tmr_t *tmrp, long ticks)
739 mutex_init(&tmrp->t_mutex, NULL, MUTEX_DRIVER, NULL);
747 tmrp->t_ticks = ticks;
768 ghd_timer_fini(tmr_t *tmrp)
770 mutex_destroy(&tmrp->t_mutex);
775 ghd_timer_attach(ccc_t *cccp, tmr_t *tmrp,
795 mutex_enter(&tmrp->t_mutex);
797 cccp->ccc_nextp = tmrp->t_ccc_listp;
798 tmrp->t_ccc_listp = cccp;
799 cccp->ccc_tmrp = tmrp;
800 mutex_exit(&tmrp->t_mutex);
808 ghd_timeout_enable(tmrp);
825 tmr_t *tmrp = cccp->ccc_tmrp;
832 mutex_enter(&tmrp->t_mutex);
834 prevpp = &tmrp->t_ccc_listp;
850 mutex_exit(&tmrp->t_mutex);
855 ghd_timeout_disable(tmrp);