Lines Matching defs:htp
562 * Convert interval expressed in htp->hrt_res to new_res.
564 * Calculate: (interval * new_res) / htp->hrt_res rounding off as
573 _hrtnewres(htp, new_res, round)
574 register hrtimer_t *htp;
591 if (new_res > NANOSEC || htp->hrt_rem < 0)
594 if (htp->hrt_rem >= htp->hrt_res) {
595 htp->hrt_secs += htp->hrt_rem / htp->hrt_res;
596 htp->hrt_rem = htp->hrt_rem % htp->hrt_res;
599 interval = htp->hrt_rem;
601 htp->hrt_res = new_res;
623 result = numerator / htp->hrt_res;
628 * (interval * new_res) % htp->hrt_res
630 * If it is greater than half of the htp->hrt_res,
635 * result * htp->hrt_res != numerator
645 modulus = numerator - result * htp->hrt_res;
653 if (twomodulus >= htp->hrt_res) {
660 htp->hrt_res = new_res;
661 htp->hrt_rem = result;
665 if (result * htp->hrt_res != numerator) {
672 htp->hrt_res = new_res;
673 htp->hrt_rem = result;
676 htp->hrt_res = new_res;
677 htp->hrt_rem = result;
697 * ((interval * new_res) + htp->hrt_res / 2) / htp->hrt_res
701 * ((interval * new_res) + htp->hrt_res - 1) / htp->hrt_res
707 drem = htp->hrt_res / 2;
710 drem = htp->hrt_res - 1;
714 dfrom_res = htp->hrt_res;
725 htp->hrt_res = new_res;
726 htp->hrt_rem = (int)quot;