Home
last modified time | relevance | path

Searched refs:frac (Results 1 – 25 of 64) sorted by relevance

123

/freebsd-14-stable/sys/sys/
HDtime.h57 uint64_t frac; member
65 _u = _bt->frac; in bintime_addx()
66 _bt->frac += _x; in bintime_addx()
67 if (_u > _bt->frac) in bintime_addx()
76 _u = _bt->frac; in bintime_add()
77 _bt->frac += _bt2->frac; in bintime_add()
78 if (_u > _bt->frac) in bintime_add()
88 _u = _bt->frac; in bintime_sub()
89 _bt->frac -= _bt2->frac; in bintime_sub()
90 if (_u < _bt->frac) in bintime_sub()
[all …]
HDabi_compat.h72 *(uint64_t *)&(dst).fld.frac[0] = (src).fld.frac; \
/freebsd-14-stable/contrib/ntp/libntp/
HDtimetoa.c50 long frac, in format_time_fraction() argument
81 if (frac < 0 || frac >= fraclimit) { in format_time_fraction()
82 qr = ldiv(frac, fraclimit); in format_time_fraction()
88 frac = qr.rem; in format_time_fraction()
95 if (0 == frac) in format_time_fraction()
98 frac = fraclimit - frac; in format_time_fraction()
103 notneg? "" : "-", secs_u, prec_u, frac); in format_time_fraction()
HDntp_calgps.c109 datum->frac += offset.l_uf; in gpsntp_add_offset()
110 datum->secs += (datum->frac < offset.l_uf); in gpsntp_add_offset()
127 datum->frac += offset.l_uf; in gpscal_add_offset()
128 datum->wsecs += (datum->frac < offset.l_uf); in gpscal_add_offset()
209 (retv.secs == lim && retv.frac >= pivot->frac)); in _gpsntp_from_daytime()
213 (retv.secs == lim && retv.frac < pivot->frac)); in _gpsntp_from_daytime()
260 dpiv.frac = pivot.l_uf; in gpsntp_from_daytime1_ex()
320 retv.frac = gd->frac; in gpsntp_from_gpscal_ex()
336 retv.l_uf = nd->frac; in ntpfp_from_ntpdatum()
470 gps.frac = 0; in gpscal_from_calendar_ex()
[all …]
/freebsd-14-stable/sys/arm/allwinner/clkng/
HDaw_clk_frac.c54 struct aw_clk_frac frac; member
206 if (*fout * multiple == sc->frac.freq0) { in aw_clk_frac_set_freq()
207 best = best_frac = sc->frac.freq0; in aw_clk_frac_set_freq()
212 else if (*fout * multiple == sc->frac.freq1) { in aw_clk_frac_set_freq()
213 best = best_frac = sc->frac.freq1; in aw_clk_frac_set_freq()
271 val &= ~sc->frac.mode_sel; in aw_clk_frac_set_freq()
274 if (best_frac == sc->frac.freq0) in aw_clk_frac_set_freq()
275 val &= ~sc->frac.freq_sel; in aw_clk_frac_set_freq()
277 val |= sc->frac.freq_sel; in aw_clk_frac_set_freq()
279 val |= sc->frac.mode_sel; /* Select integer mode */ in aw_clk_frac_set_freq()
[all …]
HDccu_a64.c732 { .type = AW_CLK_FRAC, .clk.frac = &pll_video0_clk},
733 { .type = AW_CLK_FRAC, .clk.frac = &pll_ve_clk},
737 { .type = AW_CLK_FRAC, .clk.frac = &pll_video1_clk},
738 { .type = AW_CLK_FRAC, .clk.frac = &pll_gpu_clk},
740 { .type = AW_CLK_FRAC, .clk.frac = &pll_hsic_clk},
741 { .type = AW_CLK_FRAC, .clk.frac = &pll_de_clk},
HDccu_a31.c872 { .type = AW_CLK_FRAC, .clk.frac = &pll_video0_clk},
873 { .type = AW_CLK_FRAC, .clk.frac = &pll_ve_clk},
874 { .type = AW_CLK_FRAC, .clk.frac = &pll_video1_clk},
875 { .type = AW_CLK_FRAC, .clk.frac = &pll_gpu_clk},
876 { .type = AW_CLK_FRAC, .clk.frac = &pll9_clk},
877 { .type = AW_CLK_FRAC, .clk.frac = &pll10_clk},
HDccu_h3.c687 { .type = AW_CLK_FRAC, .clk.frac = &pll_video_clk},
688 { .type = AW_CLK_FRAC, .clk.frac = &pll_ve_clk},
689 { .type = AW_CLK_FRAC, .clk.frac = &pll_gpu_clk},
690 { .type = AW_CLK_FRAC, .clk.frac = &pll_de_clk},
HDaw_clk_frac.h37 struct aw_clk_frac frac; member
/freebsd-14-stable/sys/powerpc/fpu/
HDfpu_explode.c172 u_int frac, f0, f1; in fpu_stof() local
176 frac = i & mask(SNG_FRACBITS); in fpu_stof()
177 f0 = frac >> SNG_SHIFT; in fpu_stof()
178 f1 = frac << (32 - SNG_SHIFT); in fpu_stof()
179 FP_TOF(exp, SNG_EXP_BIAS, frac, f0, f1, 0, 0); in fpu_stof()
190 u_int frac, f0, f1, f2; in fpu_dtof() local
194 frac = i & mask(DBL_FRACBITS - 32); in fpu_dtof()
195 f0 = frac >> DBL_SHIFT; in fpu_dtof()
196 f1 = (frac << (32 - DBL_SHIFT)) | (j >> DBL_SHIFT); in fpu_dtof()
198 frac |= j; in fpu_dtof()
[all …]
/freebsd-14-stable/crypto/openssl/test/
HDbioprinttest.c224 const double frac = 2.0 / 3.0; in test_fp() local
231 && TEST_true(dofptest(i, t++, frac, pwp->w, pwp->p)) in test_fp()
232 && TEST_true(dofptest(i, t++, frac / 1000, pwp->w, pwp->p)) in test_fp()
233 && TEST_true(dofptest(i, t++, frac / 10000, pwp->w, pwp->p)) in test_fp()
234 && TEST_true(dofptest(i, t++, 6.0 + frac, pwp->w, pwp->p)) in test_fp()
235 && TEST_true(dofptest(i, t++, 66.0 + frac, pwp->w, pwp->p)) in test_fp()
236 && TEST_true(dofptest(i, t++, 666.0 + frac, pwp->w, pwp->p)) in test_fp()
237 && TEST_true(dofptest(i, t++, 6666.0 + frac, pwp->w, pwp->p)) in test_fp()
238 && TEST_true(dofptest(i, t++, 66666.0 + frac, pwp->w, pwp->p)); in test_fp()
/freebsd-14-stable/tests/sys/net/
HDrandsleep.c42 double frac; in main() local
56 frac = (double)random() / (double)RANDOM_MAX; in main()
57 usecs = (useconds_t)((double)max_usecs * frac); in main()
/freebsd-14-stable/contrib/ntp/ntpd/
HDrefclock_bancomm.c128 long frac; member
447 tptr->frac, in vme_poll()
456 pp->nsec = tptr->frac; in vme_poll()
569 time_vme->frac = (u_long) atoi(cbuf); in get_datumtime()
598 time_vme->frac = (dmin & 0x000fffff) * 1000; in tvme_fill()
599 time_vme->frac += ((dmin & 0x00f00000) >> 20) * 100; in tvme_fill()
614 time_vme->frac = stfp->usec*1000; in stfp_time2tvme()
615 time_vme->frac += stfp->hnsec * 100; in stfp_time2tvme()
/freebsd-14-stable/sys/dev/clk/xilinx/
HDzynqmp_clk_pll.c65 uint32_t div, mode, frac; in zynqmp_clk_pll_recalc() local
86 ZYNQMP_FIRMWARE_PLL_GET_FRAC_DATA(sc->firmware, sc->id, &frac); in zynqmp_clk_pll_recalc()
87 pll_frac = (*freq * frac) / (1 << 16); in zynqmp_clk_pll_recalc()
/freebsd-14-stable/contrib/netbsd-tests/usr.bin/xlint/lint1/
HDd_c99_compound_literal_comma.c3 unsigned long long frac; member
12 .frac = (((us % 1000000U) >> 32)/1000000U) >> 32, in us2bintime()
/freebsd-14-stable/sys/amd64/vmm/io/
HDvatpit.c116 result += delta.frac / vatpit->freq_bt.frac; in vatpit_delta_ticks()
189 delta.frac = vatpit->freq_bt.frac * c->initial; in pit_timer_start_cntr0()
484 SNAPSHOT_VAR_OR_LEAVE(vatpit->freq_bt.frac, meta, ret, done); in vatpit_snapshot()
495 SNAPSHOT_VAR_OR_LEAVE(channel->now_bt.frac, meta, ret, done); in vatpit_snapshot()
505 SNAPSHOT_VAR_OR_LEAVE(channel->callout_bt.frac, meta, ret, in vatpit_snapshot()
/freebsd-14-stable/contrib/libpcap/
HDsf-pcapng.c1112 uint64_t t, sec, frac; in pcap_ng_next_packet() local
1385 frac = t % ps->ifaces[interface_id].tsresol; in pcap_ng_next_packet()
1414 frac *= ps->ifaces[interface_id].scale_factor; in pcap_ng_next_packet()
1437 frac *= ps->user_tsresol; in pcap_ng_next_packet()
1438 frac /= ps->ifaces[interface_id].tsresol; in pcap_ng_next_packet()
1457 frac /= ps->ifaces[interface_id].scale_factor; in pcap_ng_next_packet()
1484 frac *= ps->user_tsresol; in pcap_ng_next_packet()
1485 frac /= ps->ifaces[interface_id].tsresol; in pcap_ng_next_packet()
1494 hdr->ts.tv_usec = (long)frac; in pcap_ng_next_packet()
1503 hdr->ts.tv_usec = (int)frac; in pcap_ng_next_packet()
/freebsd-14-stable/sys/kern/
HDkern_tc.c607 bt2.frac = period; in ffclock_convert_delta()
629 uint64_t frac; in ffclock_windup() local
737 bt.frac = 5000000 * (uint64_t)18446744073LL; in ffclock_windup()
743 frac = 0; in ffclock_windup()
745 frac -= 1; in ffclock_windup()
746 frac /= ffdelta / gap_lerp.sec; in ffclock_windup()
748 frac += gap_lerp.frac / ffdelta; in ffclock_windup()
751 ffth->period_lerp += frac; in ffclock_windup()
753 ffth->period_lerp -= frac; in ffclock_windup()
1091 bt.frac = ((time_esterror - bt.sec) * 1000000) * in sysclock_getsnapshot()
[all …]
/freebsd-14-stable/contrib/less/
HDoption.c722 long frac = 0; in getfraction() local
733 frac = (frac * 10) + (*s - '0'); in getfraction()
737 frac *= 10; in getfraction()
741 return (frac); in getfraction()
/freebsd-14-stable/contrib/ntp/include/
HDntp_calgps.h40 uint32_t frac; /* fractional seconds */ member
49 uint32_t frac; /* fractional seconds */ member
HDntp_datum.h25 unsigned long frac; member
HDtimetoa.h81 format_time_fraction(time_t secs, long frac, int prec);
/freebsd-14-stable/sys/netinet/
HDtcp_subr.c4208 uint32_t val, frac; in tcp_change_time_units() local
4211 frac = tp->t_srtt & 0x1f; in tcp_change_time_units()
4218 if (frac) { in tcp_change_time_units()
4220 frac = (((uint64_t)frac * (uint64_t)HPTS_USEC_IN_MSEC) / (uint64_t)TCP_RTT_SCALE); in tcp_change_time_units()
4222frac = (((uint64_t)frac * (uint64_t)HPTS_USEC_IN_SEC) / ((uint64_t)(hz) * (uint64_t)TCP_RTT_SCALE)… in tcp_change_time_units()
4224 tp->t_srtt += frac; in tcp_change_time_units()
4228 uint32_t val, frac; in tcp_change_time_units() local
4231 frac = tp->t_rttvar & 0x1f; in tcp_change_time_units()
4238 if (frac) { in tcp_change_time_units()
4240 frac = (((uint64_t)frac * (uint64_t)HPTS_USEC_IN_MSEC) / (uint64_t)TCP_RTT_SCALE); in tcp_change_time_units()
[all …]
/freebsd-14-stable/sys/contrib/dev/mediatek/mt76/
HDmt76x02_dfs.c183 static int mt76x02_dfs_get_multiple(int val, int frac, int margin) in mt76x02_dfs_get_multiple() argument
187 if (!frac) in mt76x02_dfs_get_multiple()
190 if (abs(val - frac) <= margin) in mt76x02_dfs_get_multiple()
193 factor = val / frac; in mt76x02_dfs_get_multiple()
194 remainder = val % frac; in mt76x02_dfs_get_multiple()
197 if ((frac - remainder) <= margin) in mt76x02_dfs_get_multiple()
/freebsd-14-stable/sys/arm64/rockchip/clk/
HDrk_clk_pll.c383 uint32_t postdiv1, postdiv2, frac; in rk3328_clk_pll_recalc() local
401 frac = (raw3 & RK3328_CLK_PLL_FRAC_MASK) >> RK3328_CLK_PLL_FRAC_SHIFT; in rk3328_clk_pll_recalc()
410 frac_rate = *freq * frac / refdiv; in rk3328_clk_pll_recalc()
477 reg |= rates->frac << RK3328_CLK_PLL_FRAC_SHIFT; in rk3328_clk_pll_set_freq()
713 reg |= rates->frac << RK3399_CLK_PLL_FRAC_SHIFT; in rk3399_clk_pll_set_freq()

123