| 1879 | } |
| 1880 | |
| 1881 | static void __inline |
| 1882 | tc_adjprecision(void) |
| 1883 | { |
| 1884 | int t; |
| 1885 | |
| 1886 | if (tc_timepercentage > 0) { |
| 1887 | t = (99 + tc_timepercentage) / tc_timepercentage; |
| 1888 | tc_precexp = fls(t + (t >> 1)) - 1; |
| 1889 | FREQ2BT(hz / tc_tick, &bt_timethreshold); |
| 1890 | FREQ2BT(hz, &bt_tickthreshold); |
| 1891 | bintime_shift(&bt_timethreshold, tc_precexp); |
| 1892 | bintime_shift(&bt_tickthreshold, tc_precexp); |
| 1893 | } else { |
| 1894 | tc_precexp = 31; |
| 1895 | bt_timethreshold.sec = INT_MAX; |
| 1896 | bt_timethreshold.frac = ~(uint64_t)0; |
| 1897 | bt_tickthreshold = bt_timethreshold; |
| 1898 | } |
| 1899 | sbt_timethreshold = bttosbt(bt_timethreshold); |
| 1900 | sbt_tickthreshold = bttosbt(bt_tickthreshold); |
| 1901 | } |
| 1902 | |
| 1903 | static int |
| 1904 | sysctl_kern_timecounter_adjprecision(SYSCTL_HANDLER_ARGS) |
no test coverage detected