Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2017 11:03:11 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324528 - head/sys/kern
Message-ID:  <201710111103.v9BB3Bew032701@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Oct 11 11:03:11 2017
New Revision: 324528
URL: https://svnweb.freebsd.org/changeset/base/324528

Log:
  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

Modified:
  head/sys/kern/kern_tc.c

Modified: head/sys/kern/kern_tc.c
==============================================================================
--- head/sys/kern/kern_tc.c	Wed Oct 11 10:56:59 2017	(r324527)
+++ head/sys/kern/kern_tc.c	Wed Oct 11 11:03:11 2017	(r324528)
@@ -1413,10 +1413,8 @@ tc_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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710111103.v9BB3Bew032701>