Lines Matching defs:it

57 	itimer_t *it = &state->tfd_itimer;
61 while (it->it_lock & ITLK_LOCKED) {
62 it->it_blockers++;
63 cv_wait(&it->it_cv, &state->tfd_lock);
64 it->it_blockers--;
67 it->it_lock |= ITLK_LOCKED;
71 return (it);
75 timerfd_itimer_unlock(timerfd_state_t *state, itimer_t *it)
77 VERIFY(it == &state->tfd_itimer);
78 VERIFY(it->it_lock & ITLK_LOCKED);
82 it->it_lock &= ~ITLK_LOCKED;
84 if (it->it_blockers)
85 cv_signal(&it->it_cv);
91 timerfd_fire(itimer_t *it)
93 timerfd_state_t *state = it->it_frontend;
168 * Our tfd_fired is non-zero; slurp its value and then clear it.
256 itimer_t *it;
265 it = timerfd_itimer_lock(state);
267 if (it->it_backend != NULL) {
268 timerfd_itimer_unlock(state, it);
272 if ((it->it_backend = clock_get_backend(arg)) == NULL) {
273 timerfd_itimer_unlock(state, it);
279 * of locking CLOCK_REALTIME-based timers -- it is safe to
282 it->it_proc = &p0;
284 err = it->it_backend->clk_timer_create(it, timerfd_fire);
287 it->it_backend = NULL;
288 timerfd_itimer_unlock(state, it);
292 it->it_frontend = state;
293 timerfd_itimer_unlock(state, it);
299 it = timerfd_itimer_lock(state);
301 if (it->it_backend == NULL) {
302 timerfd_itimer_unlock(state, it);
306 err = it->it_backend->clk_timer_gettime(it, &when);
307 timerfd_itimer_unlock(state, it);
327 it = timerfd_itimer_lock(state);
329 if (it->it_backend == NULL) {
330 timerfd_itimer_unlock(state, it);
335 err = it->it_backend->clk_timer_gettime(it, &oval);
338 timerfd_itimer_unlock(state, it);
353 * timer value, but before it can fire with the new one).
360 * this is possible, it does not (for the moment) seem worth
361 * it: if the timer is firing at essentially the same moment
362 * that it's being reprogrammed, there is a higher-level race
364 * have to properly resolve -- and it seems reasonable to
365 * simply allow the program to resolve it in this case.
371 err = it->it_backend->clk_timer_settime(it,
374 timerfd_itimer_unlock(state, it);
397 itimer_t *it;
408 * No one can get to this timer; we don't need to lock it -- we can
409 * just call on the backend to delete it.
411 it = &state->tfd_itimer;
413 if (it->it_backend != NULL)
414 it->it_backend->clk_timer_delete(it);