Lines Matching refs:th
426 tc_delta(struct timehands *th)
430 tc = th->th_counter;
432 th->th_offset_count) & tc->tc_counter_mask;
444 struct timehands *th;
474 * th->th_generation, I'm all ears.
484 th = atomic_load_consume(&timehands);
485 gen = th->th_generation;
487 *bt = th->th_offset;
488 bintime_addx(bt, th->th_scale * tc_delta(th));
490 } while (gen == 0 || gen != th->th_generation);
550 struct timehands *th;
555 th = atomic_load_consume(&timehands);
556 gen = th->th_generation;
558 *bt = th->th_offset;
560 } while (gen == 0 || gen != th->th_generation);
566 struct timehands *th;
571 th = atomic_load_consume(&timehands);
572 gen = th->th_generation;
574 bintime2timespec(&th->th_offset, tsp);
576 } while (gen == 0 || gen != th->th_generation);
582 struct timehands *th;
587 th = atomic_load_consume(&timehands);
588 gen = th->th_generation;
590 bintime2timeval(&th->th_offset, tvp);
592 } while (gen == 0 || gen != th->th_generation);
598 struct timehands *th;
604 th = atomic_load_consume(&timehands);
605 gen = th->th_generation;
607 *bt = th->th_offset;
609 } while (gen == 0 || gen != th->th_generation);
617 struct timehands *th;
622 th = atomic_load_consume(&timehands);
623 gen = th->th_generation;
625 th->th_nanotime;
627 } while (gen == 0 || gen != th->th_generation);
649 struct timehands *th;
654 th = atomic_load_consume(&timehands);
655 gen = th->th_generation;
657 *tvp = th->th_microtime;
659 } while (gen == 0 || gen != th->th_generation);
916 struct timehands *th, *tho;
933 th = tho->th_next;
934 ogen = th->th_generation;
935 th->th_generation = 0;
937 bcopy(tho, th, offsetof(struct timehands, th_generation));
944 delta = tc_delta(th);
945 if (th->th_counter != timecounter)
949 th->th_offset_count += delta;
950 bintime_addx(&th->th_offset, th->th_scale * delta);
974 bt = th->th_offset;
981 ntp_update_second(&th->th_adjustment, &bt.sec);
994 bintime2timeval(&bt, &th->th_microtime);
995 bintime2timespec(&bt, &th->th_nanotime);
997 if (th->th_counter != timecounter) {
998 th->th_counter = timecounter;
999 th->th_offset_count = ncount;
1028 scale += (th->th_adjustment / 1024) * 2199;
1029 scale /= th->th_counter->tc_frequency;
1030 th->th_scale = scale * 2;
1040 th->th_generation = ogen;
1046 setrealuptime(th->th_microtime.tv_sec, th->th_offset.sec);
1047 atomic_store_release(&timehands, th);
1136 struct timehands *th;
1141 th = timehands;
1142 pps->capgen = th->th_generation;
1143 pps->capth = th;
1144 pps->capcount = (uint64_t)tc_delta(th) + th->th_offset_count;
1145 if (pps->capgen != th->th_generation)
1205 struct timehands *th;
1220 th = timehands;
1221 gen = th->th_generation;
1222 tcount = (uint64_t)tc_delta(th) + th->th_offset_count;
1223 if (gen != th->th_generation)