Page MenuHomeFreeBSD

D35934.id.diff
No OneTemporary

D35934.id.diff

Index: sys/kern/kern_tc.c
===================================================================
--- sys/kern/kern_tc.c
+++ sys/kern/kern_tc.c
@@ -1781,7 +1781,7 @@
struct timecounter *captc;
uint64_t capth_scale;
struct bintime bt;
- struct timespec ts, *tsp, *osp;
+ struct timespec *tsp, *osp;
u_int tcount, *pcount;
int foff;
pps_seq_t *pseq;
@@ -1881,7 +1881,7 @@
#ifdef PPS_SYNC
if (fhard) {
- uint64_t scale;
+ uint64_t nsec;
/*
* Feed the NTP PLL/FLL.
@@ -1891,14 +1891,10 @@
tcount = pps->capcount - pps->ppscount[2];
pps->ppscount[2] = pps->capcount;
tcount &= captc->tc_counter_mask;
- scale = (uint64_t)1 << 63;
- scale /= captc->tc_frequency;
- scale *= 2;
- bt.sec = 0;
- bt.frac = 0;
- bintime_addx(&bt, scale * tcount);
- bintime2timespec(&bt, &ts);
- hardpps(tsp, ts.tv_nsec + 1000000000 * ts.tv_sec);
+ nsec = 1000000000;
+ nsec *= tcount;
+ nsec /= captc->tc_frequency;
+ hardpps(tsp, (long)nsec);
}
#endif

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 30, 5:14 PM (8 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27388933
Default Alt Text
D35934.id.diff (977 B)

Event Timeline