From owner-cvs-src@FreeBSD.ORG Wed Jun 25 15:24:25 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C933D37B401; Wed, 25 Jun 2003 15:24:25 -0700 (PDT) Received: from possum.cryptohill.net (cambist.cryptohill.net [24.244.145.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39F754401F; Wed, 25 Jun 2003 15:24:25 -0700 (PDT) (envelope-from jeroen@vangelderen.org) Received: from vangelderen.org (grolsch.cryptohill.net [24.244.145.13]) by possum.cryptohill.net (Postfix) with ESMTP id D42CDAE0E3; Wed, 25 Jun 2003 18:24:24 -0400 (EDT) Date: Wed, 25 Jun 2003 18:24:24 -0400 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) To: Warner Losh From: "Jeroen C. van Gelderen" In-Reply-To: <200306252123.h5PLNpgC044447@repoman.freebsd.org> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.552) cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_tc.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2003 22:24:26 -0000 On Wednesday, Jun 25, 2003, at 17:23 US/Eastern, Warner Losh wrote: > imp 2003/06/25 14:23:51 PDT > > FreeBSD src repository > > Modified files: > sys/kern kern_tc.c > Log: > Fix leap second processing by the kernel time keeping routines. > Before, we would add/subtract the leap second when the system had > been > up for an even multiple of days, rather than at the end of the day, > as > a leap second is defined (at least wrt ntp). We do this by > calculating the notion of UTC earlier in the loop, and passing that > to > get it adjusted. Any adjustments that ntp_update_second makes to > this > time are then transferred to boot time. We can't pass it either the > boot time or the uptime because their sum is what determines when a > leap second is needed. This code adds an extra assignment and two > extra compare in the typical case, which is as cheap as I could made > it. [...] Exemplary commit message. -J -- Jeroen C. van Gelderen - jeroen@vangelderen.org Squeeze human nature into the straitjacket of criminal justice and crime will appear. -- Karl Kraus (1908)