summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-10-11 11:03:11 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-12 07:04:12 +0200
commitbcbbe76396c4fcada2d7d4273078bbe9d7a61843 (patch)
treef77898003cf9934f9e397ce07546876f7f6b563b /cpukit/score
parent5167d0e76bd0e153a5147064c96e2aa5e7282bc2 (diff)
downloadrtems-bcbbe76396c4fcada2d7d4273078bbe9d7a61843.tar.bz2
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 <sebastian.huber@embedded-brains.de> MFC after: 1 week Update #3175.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/src/kern_tc.c4
1 files changed, 1 insertions, 3 deletions
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);