Lines Matching refs:htp
559 * Convert interval expressed in htp->hrt_res to new_res.
561 * Calculate: (interval * new_res) / htp->hrt_res rounding off as
570 _hrtnewres(htp, new_res, round)
571 register hrtimer_t *htp;
588 if (new_res > NANOSEC || htp->hrt_rem < 0)
591 if (htp->hrt_rem >= htp->hrt_res) {
592 htp->hrt_secs += htp->hrt_rem / htp->hrt_res;
593 htp->hrt_rem = htp->hrt_rem % htp->hrt_res;
596 interval = htp->hrt_rem;
598 htp->hrt_res = new_res;
620 result = numerator / htp->hrt_res;
625 * (interval * new_res) % htp->hrt_res
627 * If it is greater than half of the htp->hrt_res,
632 * result * htp->hrt_res != numerator
642 modulus = numerator - result * htp->hrt_res;
650 if (twomodulus >= htp->hrt_res) {
657 htp->hrt_res = new_res;
658 htp->hrt_rem = result;
662 if (result * htp->hrt_res != numerator) {
669 htp->hrt_res = new_res;
670 htp->hrt_rem = result;
673 htp->hrt_res = new_res;
674 htp->hrt_rem = result;
694 * ((interval * new_res) + htp->hrt_res / 2) / htp->hrt_res
698 * ((interval * new_res) + htp->hrt_res - 1) / htp->hrt_res
704 drem = htp->hrt_res / 2;
707 drem = htp->hrt_res - 1;
711 dfrom_res = htp->hrt_res;
722 htp->hrt_res = new_res;
723 htp->hrt_rem = (int)quot;