freebsd kernel with SKQ
Go to file
imp 9f82a8a978 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.

I have confirmed with this code the kernel time does the correct thing
for both positive and negative leap seconds.  Since the ntp interface
doesn't allow for +2 or -2, those cases can't be tested (and the folks
in the know here say there will never be a +2s or -2s leap event, but
rather two +1s or -1s leap events).

There will very likely be no leap seconds for a while, given how the
earth is speeding up and slowing down, so there will be plenty of time
for this fix to propigate.  UT1-UTC is currently at "about -0.4s" and
decrementing by .1s every 8 months or so.  6 * 8 is 48 months, or 4
years.

-stable has different code, but a similar bug that was introduced
about the time of the last leap second, which is why nobody has
noticed until now.

MFC After: 3 weeks
Reviewed by: phk

"Furthermore, leap seconds must die." -- Cato the Elder
2003-06-25 21:23:51 +00:00
bin support saving both user/group and permissions on symlinks (from PR) 2003-06-22 07:02:17 +00:00
contrib Remove bit about _THREAD_SAFE. deischen committed a change to stdio.h 2003-06-25 16:12:05 +00:00
crypto This commit was generated by cvs2svn to compensate for changes in r116791, 2003-06-24 19:30:44 +00:00
etc install new 802.11 headers 2003-06-25 14:59:17 +00:00
games Handle 12-hour clocks properly: when the time is 00:00-00:59, adjust the 2003-06-23 16:01:11 +00:00
gnu Add an amd64 category now that amd64 has its own mailing list and all. 2003-06-20 10:48:26 +00:00
include back out install of net80211 include files until I can remove the old code 2003-06-25 19:39:03 +00:00
kerberos5 s/USE_OPENLDAP/WITH_OPENLDAP/ per request from kris. 2003-06-18 14:23:44 +00:00
lib Be more specific in BUGS. 2003-06-25 19:18:44 +00:00
libexec Don't declare unneeded extern variables, 2003-06-21 10:45:38 +00:00
release New errata: Problems with upgrading msdos(5) mounts from RO to RW. [1] 2003-06-24 17:58:22 +00:00
sbin o correct mode request handling 2003-06-25 15:05:17 +00:00
secure Fix for the NO_OPENSSL case. 2003-06-08 08:24:07 +00:00
share 'options atm' should actually read 'device atm'. 2003-06-25 16:04:19 +00:00
sys Fix leap second processing by the kernel time keeping routines. 2003-06-25 21:23:51 +00:00
tools amd64 is actually stable enough for the regular -CURRENT tinderbox now. 2003-06-20 16:57:37 +00:00
usr.bin Restore INET6 option from config.h. 2003-06-25 15:53:25 +00:00
usr.sbin Temporarily re-remove the bluetooth tools.. 2003-06-24 19:11:14 +00:00
COPYRIGHT
MAINTAINERS Also remove the ones that snuck in at the bottom. 2003-06-16 16:12:05 +00:00
Makefile Do the upgrade checks quietly. 2003-06-22 21:56:22 +00:00
Makefile.inc1 Allow installkernel.debug and reinstallkernel.debug. 2003-06-22 10:01:03 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Add a retrospective entry about how having installed a broken sed(1) 2003-06-13 20:05:46 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html