Lines Matching +full:gen +full:- +full:2
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
11 * 2. Redistributions in binary form must reproduce the above copyright
46 *delta = (tc - th->th_offset_count) & th->th_counter_mask; in tc_delta()
51 * Calculate the absolute or boot-relative time from the
52 * machine-specific fast timecounter and the published timehands
56 * in-kernel timehands, see sys/kern/kern_tc.c:binuptime(). This code
63 uint32_t curr, gen; in binuptime() local
69 if (!tk->tk_enabled) in binuptime()
72 curr = atomic_load_acq_32(&tk->tk_current); in binuptime()
73 th = &tk->tk_th[curr]; in binuptime()
74 gen = atomic_load_acq_32(&th->th_gen); in binuptime()
75 *bt = th->th_offset; in binuptime()
81 scale = th->th_scale; in binuptime()
90 bt->sec += x >> 32; in binuptime()
95 bintime_add(bt, &th->th_boottime); in binuptime()
102 } while (curr != tk->tk_current || gen == 0 || gen != th->th_gen); in binuptime()
110 uint32_t curr, gen; in getnanouptime() local
113 if (!tk->tk_enabled) in getnanouptime()
116 curr = atomic_load_acq_32(&tk->tk_current); in getnanouptime()
117 th = &tk->tk_th[curr]; in getnanouptime()
118 gen = atomic_load_acq_32(&th->th_gen); in getnanouptime()
119 *bt = th->th_offset; in getnanouptime()
126 } while (curr != tk->tk_current || gen == 0 || gen != th->th_gen); in getnanouptime()
146 if (tk->tk_ver != VDSO_TK_VER_CURR) in __vdso_gettimeofday()
167 if (tk->tk_ver != VDSO_TK_VER_CURR) in __vdso_clock_gettime()
194 ts->tv_nsec = 0; in __vdso_clock_gettime()