Lines Matching refs:htp
66 hrtconvert(hrtimer_t *htp) in hrtconvert() argument
71 product = htp->hrt_secs * htp->hrt_res; in hrtconvert()
73 if (product / htp->hrt_res == htp->hrt_secs) { in hrtconvert()
74 sum = product + htp->hrt_rem; in hrtconvert()
75 if (sum - htp->hrt_rem == product) { in hrtconvert()
101 _hrtnewres(hrtimer_t *htp, ulong_t new_res, long round) in _hrtnewres() argument
116 if (htp->hrt_res == 0 || new_res == 0 || in _hrtnewres()
117 new_res > NANOSEC || htp->hrt_rem < 0) in _hrtnewres()
120 if (htp->hrt_rem >= htp->hrt_res) { in _hrtnewres()
121 htp->hrt_secs += htp->hrt_rem / htp->hrt_res; in _hrtnewres()
122 htp->hrt_rem = htp->hrt_rem % htp->hrt_res; in _hrtnewres()
125 interval = htp->hrt_rem; in _hrtnewres()
127 htp->hrt_res = new_res; in _hrtnewres()
149 result = numerator / htp->hrt_res; in _hrtnewres()
171 modulus = numerator - result * htp->hrt_res; in _hrtnewres()
179 if (twomodulus >= htp->hrt_res) { in _hrtnewres()
186 htp->hrt_res = new_res; in _hrtnewres()
187 htp->hrt_rem = result; in _hrtnewres()
191 if (result * htp->hrt_res != numerator) { in _hrtnewres()
198 htp->hrt_res = new_res; in _hrtnewres()
199 htp->hrt_rem = result; in _hrtnewres()
202 htp->hrt_res = new_res; in _hrtnewres()
203 htp->hrt_rem = result; in _hrtnewres()
233 drem = htp->hrt_res / 2; in _hrtnewres()
236 drem = htp->hrt_res - 1; in _hrtnewres()
240 dfrom_res = htp->hrt_res; in _hrtnewres()
251 htp->hrt_res = new_res; in _hrtnewres()
252 htp->hrt_rem = (int)quot; in _hrtnewres()