Lines Matching refs:clock_calend

74 static struct clock_calend {
81 } clock_calend;
86 * Unlocked calendar flipflop; this is used to track a clock_calend such
87 * that we can safely access a snapshot of a valid clock_calend structure
96 struct clock_calend calend; /* copy of calendar */
243 if (clock_calend.adjdelta < 0) {
255 if (now > clock_calend.adjstart) {
256 t32 = (uint32_t)(now - clock_calend.adjstart);
258 if (t32 > clock_calend.adjoffset)
259 now -= clock_calend.adjoffset;
261 now = clock_calend.adjstart;
265 now += clock_calend.offset;
269 *secs += (clock_sec_t)clock_calend.epoch;
298 if (clock_calend.adjdelta < 0) {
301 if (now > clock_calend.adjstart) {
302 t32 = (uint32_t)(now - clock_calend.adjstart);
304 if (t32 > clock_calend.adjoffset)
305 now -= clock_calend.adjoffset;
307 now = clock_calend.adjstart;
311 now += clock_calend.offset;
317 *secs += (clock_sec_t)clock_calend.epoch;
347 if (clock_calend.adjdelta >= 0) {
348 clock_gettimeofday_set_commpage(now, clock_calend.epoch, clock_calend.offset, secs, microsecs);
353 if (now > clock_calend.adjstart) {
354 t32 = (uint32_t)(now - clock_calend.adjstart);
356 if (t32 > clock_calend.adjoffset)
357 now -= clock_calend.adjoffset;
359 now = clock_calend.adjstart;
362 now += clock_calend.offset;
366 *secs += (clock_sec_t)clock_calend.epoch;
412 clock_boottime += secs - clock_calend.epoch;
417 clock_calend.epoch = secs;
419 nanoseconds_to_absolutetime((uint64_t)microsecs * NSEC_PER_USEC, &clock_calend.offset);
424 calend_adjtotal = clock_calend.adjdelta = 0;
483 clock_calend.epoch = secs;
485 nanoseconds_to_absolutetime((uint64_t)microsecs * NSEC_PER_USEC, &clock_calend.offset);
490 calend_adjtotal = clock_calend.adjdelta = 0;
613 clock_calend.adjoffset = (uint32_t)t64;
632 clock_calend.adjstart = now;
638 clock_calend.adjoffset = (uint32_t)t64;
649 clock_calend.adjdelta = delta;
660 calend_adjtotal = clock_calend.adjdelta = 0;
715 delta = clock_calend.adjdelta;
718 clock_calend.offset += clock_calend.adjoffset;
722 clock_calend.adjdelta = delta = (int32_t)calend_adjtotal;
725 clock_calend.adjoffset = (uint32_t)t64;
730 clock_calend.offset -= clock_calend.adjoffset;
734 clock_calend.adjdelta = delta = (int32_t)calend_adjtotal;
737 clock_calend.adjoffset = (uint32_t)t64;
740 if (clock_calend.adjdelta != 0)
741 clock_calend.adjstart = now;
744 if (clock_calend.adjdelta != 0)
983 struct clock_calend tmp = clock_calend;