Home | History | Annotate | Download | only in linux

Lines Matching defs:hrt

41 hrtimer_init(struct hrtimer *hrt, clockid_t clkid, enum hrtimer_mode mode)
46 callout_init(&hrt->hrt_ch, CALLOUT_MPSAFE);
47 callout_setfunc(&hrt->hrt_ch, hrtimer_fire, hrt);
48 hrt->hrt_mode = mode;
52 _hrtimer_schedule(struct hrtimer *hrt)
56 switch (hrt->hrt_mode) {
61 delta = ktime_to_ms(hrt->hrt_expires);
64 panic("invalid hrtimer mode %d", hrt->hrt_mode);
66 callout_schedule(&hrt->hrt_ch, delta);
72 struct hrtimer *hrt = cookie;
74 switch ((*hrt->function)(hrt)) {
76 _hrtimer_schedule(hrt);
82 callout_ack(&hrt->hrt_ch);
86 hrtimer_set_expires(struct hrtimer *hrt, ktime_t expires)
89 hrt->hrt_expires = expires;
93 hrtimer_add_expires_ns(struct hrtimer *hrt, uint64_t ns)
96 hrt->hrt_expires = ktime_add_ns(hrt->hrt_expires, ns);
100 hrtimer_start(struct hrtimer *hrt, ktime_t expires, enum hrtimer_mode mode)
103 hrtimer_start_range_ns(hrt, expires, 0, mode);
107 hrtimer_start_range_ns(struct hrtimer *hrt, ktime_t expires, uint64_t range_ns,
111 hrt->hrt_expires = expires;
113 hrt->hrt_mode = mode;
114 _hrtimer_schedule(hrt);
118 hrtimer_cancel(struct hrtimer *hrt)
126 if (callout_halt(&hrt->hrt_ch, NULL)) {
136 active = callout_pending(&hrt->hrt_ch);
142 hrtimer_active(struct hrtimer *hrt)
152 return callout_pending(&hrt->hrt_ch) || callout_invoking(&hrt->hrt_ch);
156 hrtimer_forward(struct hrtimer *hrt, ktime_t now, ktime_t period)
160 KASSERT(!callout_pending(&hrt->hrt_ch));
169 expires_ms = ktime_to_ms(hrt->hrt_expires);
178 hrt->hrt_expires = ktime_add_ns(hrt->hrt_expires,
185 hrtimer_forward_now(struct hrtimer *hrt, ktime_t period)
188 return hrtimer_forward(hrt, ktime_get(), period);