From bcbbe76396c4fcada2d7d4273078bbe9d7a61843 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 11 Oct 2017 11:03:11 +0000 Subject: timecounter: Merge FreeBSD change r324528 The th_bintime, th_microtime and th_nanotime members of the timehand all cache the last system time (uptime + boottime). Only the format differs. Do not re-calculate the bintime and simply use the value used to calculate the microtime and nanotime. Group all the updates under the relevant comment. Remove obsoleted XXX part. Submitted by: Sebastian Huber MFC after: 1 week Update #3175. --- cpukit/score/src/kern_tc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cpukit/score') diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index fa53fcd085..306db0e9d9 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -1596,10 +1596,8 @@ _Timecounter_Windup(struct bintime *new_boottimebin, if (bt.sec != t) th->th_boottime.sec += bt.sec - t; } - th->th_bintime = th->th_offset; - bintime_add(&th->th_bintime, &th->th_boottime); /* Update the UTC timestamps used by the get*() functions. */ - /* XXX shouldn't do this here. Should force non-`get' versions. */ + th->th_bintime = bt; bintime2timeval(&bt, &th->th_microtime); bintime2timespec(&bt, &th->th_nanotime); -- cgit v1.2.3