opnsense-src/sys/sys
Poul-Henning Kamp e1d970f181 Improve the implementation of adjtime(2).
Apply the change as a continuous slew rather than as a series of
discrete steps and make it possible to adjust arbitraryly huge
amounts of time in either direction.

In practice this is done by hooking into the same once-per-second
loop as the NTP PLL and setting a suitable frequency offset deducting
the amount slewed from the remainder.  If the remaining delta is
larger than 1 second we slew at 5000PPM (5msec/sec), for a delta
less than a second we slew at 500PPM (500usec/sec) and for the last
one second period we will slew at whatever rate (less than 500PPM)
it takes to eliminate the delta entirely.

The old implementation stepped the clock a number of microseconds
every HZ to acheive the same effect, using the same rates of change.

Eliminate the global variables tickadj, tickdelta and timedelta and
their various use and initializations.

This removes the most significant obstacle to running timecounter and
NTP housekeeping from a timeout rather than hardclock.
2002-04-15 12:23:11 +00:00
..
_lock.h Add a new char * pointer lo_type to struct lock_object that is used to 2002-04-04 20:45:21 +00:00
_mutex.h Instead of get_cyclecount(9), use nanotime(9) to record acquisition and 2002-04-02 14:42:01 +00:00
_posix.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
_sigset.h Remove __P 2002-03-19 20:18:42 +00:00
_timespec.h Synchronize with some of my local changes. To quote: 2001-01-23 04:40:54 +00:00
_types.h o Implement <sys/_types.h>, a new header for storing types that are 2002-04-01 08:12:25 +00:00
aac_ioctl.h Bring the aac driver *much* closer to style(9). 2001-09-05 20:43:02 +00:00
acct.h Remove __P 2002-03-19 20:18:42 +00:00
acl.h Remove __P 2002-03-19 20:18:42 +00:00
agpio.h Fix an off-by-bit error in the AGP_MODE_[GS]ET_RATE() macros. 2001-11-21 08:40:23 +00:00
aio.h o Add missing synchronization (splnet()/splx()) in aio_free_entry(). 2002-01-06 21:03:39 +00:00
assym.h Use "nm | awk ..." instead of genassym(1) to generate symbol value headers. 2000-06-02 09:27:48 +00:00
ata.h Cleanup, use the same method to denote parts for endianess. 2002-04-05 18:03:33 +00:00
bio.h Constifixion of bio_attribute. 2002-04-09 14:03:02 +00:00
bitstring.h Cleanup of bitstring.h: 2000-10-09 12:34:51 +00:00
blist.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
buf.h Remove __P 2002-03-19 20:18:42 +00:00
bus.h Add resource_list_add_next() which returns the RID for the resource added. 2002-03-29 06:42:54 +00:00
bus_dma.h - Moved the bus_dma declarations from bus_{at386,pc98}.h into bus_dma.h. 2001-10-06 16:27:21 +00:00
bus_private.h Style(9) 2001-09-05 01:06:28 +00:00
callout.h Remove __P 2002-03-19 20:18:42 +00:00
capability.h Update copyrights to include Thomas Moestl. 2001-11-05 15:36:24 +00:00
ccdvar.h Fix some signed/unsigned integer confusion, and add bounds checking of 2001-09-10 11:28:07 +00:00
cdefs.h Make the previous revision work a little bit better. 2002-04-06 21:08:59 +00:00
cdio.h Add endianess kludge code, so that bitfields work on the sparc64 as well. 2002-04-05 13:10:26 +00:00
cdrio.h Update header. 2002-03-04 21:08:35 +00:00
chio.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
clist.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
clock.h Add a generic implementation of inittodr() and resettodr(), as well as 2002-04-04 23:39:10 +00:00
condvar.h A couple of bits survived Dans nukage of CV_DEBUG in favour of INVARIANTS, 2002-03-31 07:23:31 +00:00
conf.h Here follows the new kernel dumping infrastructure. 2002-03-31 22:37:00 +00:00
cons.h Remove __P 2002-03-19 20:18:42 +00:00
consio.h Extend CONS_GETINFO ioctl to provide information about size of the currently 2002-03-16 23:31:15 +00:00
copyright.h Welcome 2002. Happy new year. 2002-01-01 09:20:52 +00:00
ctype.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
dataacq.h Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
device_port.h Add PC-Card/ISA SCSI host adpater drivers from NetBSD/pc98 2000-10-23 12:55:51 +00:00
devicestat.h Export the head structure for the device statistics STAILQ in 2001-08-04 18:02:47 +00:00
digiio.h Add DIGIIO_SETALTPIN and DIGIIO_GETALTPIN ioctl values 2001-06-20 14:51:58 +00:00
dir.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
dirent.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
disk.h Implement DIOCGFRONTSTUFF ioctl which reports how many bytes from the start 2002-04-09 15:43:32 +00:00
disklabel.h Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>. 2002-04-08 09:20:07 +00:00
diskmbr.h Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>. 2002-04-08 09:20:07 +00:00
diskpc98.h Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>. 2002-04-08 09:20:07 +00:00
diskslice.h Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-23 08:46:52 +00:00
dkstat.h Redeclare cp_time. It's no longer static, and linprocfs needs it. 2000-09-07 16:38:04 +00:00
dmap.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
domain.h Remove __P 2002-03-19 20:18:42 +00:00
dvdio.h Update header. 2002-03-04 21:08:35 +00:00
elf32.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
elf64.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
elf_common.h Catch up with common usage: 2001-09-08 22:59:30 +00:00
elf_generic.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
errno.h Remove __P 2002-03-19 20:18:42 +00:00
event.h Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-23 08:46:52 +00:00
eventhandler.h Use sx locks rather than lockmgr locks for eventhandlers. 2002-04-02 04:18:54 +00:00
eventvar.h Simplify kqueue API slightly. 2000-07-18 19:31:52 +00:00
exec.h Remove __P 2002-03-19 20:18:42 +00:00
extattr.h Part I: Update extended attribute API and ABI: 2002-02-10 04:43:22 +00:00
fbio.h Turn on TGA support. 2002-04-13 22:34:16 +00:00
fcntl.h Remove __P 2002-03-19 20:18:42 +00:00
fdcio.h Long promised major enhancement set for the floppy disk driver: 2001-12-15 19:09:04 +00:00
file.h Removed some namespace pollution (unnecessary nested includes). 2002-03-26 12:40:48 +00:00
filedesc.h The description of fd_mtx is "filedesc structure." 2002-03-29 11:26:05 +00:00
filio.h Commit the kernel part of our DVD support. Nothing much to say really, 1999-12-07 22:25:28 +00:00
fnv_hash.h Use the same API as the example code. 2001-03-20 02:10:18 +00:00
gmon.h Reserved one of the spare fields in struct gmon to record the history 2002-02-21 05:52:49 +00:00
iconv.h Update to C99, s/__FUNCTION__/__func__/. 2001-12-10 05:58:28 +00:00
imgact.h Remove __P 2002-03-19 20:18:42 +00:00
imgact_aout.h Remove __P 2002-03-19 20:18:42 +00:00
imgact_elf.h Remove __P 2002-03-19 20:18:42 +00:00
inflate.h Forgot one more instance of my old email address. 2002-03-26 08:29:40 +00:00
interrupt.h Remove __P 2002-03-19 20:18:42 +00:00
ioccom.h I've fixed the X11 port, so I can remove the (ioctl) hack. 2002-04-10 04:53:37 +00:00
ioctl.h Hide GCCisms in the non-GCC case. 2002-02-26 07:44:03 +00:00
ioctl_bt848.h Fix typo in comments 2000-10-31 14:30:29 +00:00
ioctl_compat.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ioctl_meteor.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
ipc.h Remove __P 2002-03-19 20:18:42 +00:00
jail.h Remove __P 2002-03-19 20:18:42 +00:00
joystick.h Switch over to using the generic joy driver 1999-12-05 20:02:19 +00:00
kbio.h Implement keyboard paste 2001-03-11 22:51:05 +00:00
kernel.h Improve the implementation of adjtime(2). 2002-04-15 12:23:11 +00:00
kerneldump.h Make the kernel dump header endianness invariant by always dumping 2002-04-03 07:24:12 +00:00
kobj.h Fix typos: initalise -> initialise. 2001-02-08 20:28:57 +00:00
kse.h Add the first shot at minimum KSE interface definitions. 2002-02-19 02:12:36 +00:00
kthread.h Remove __P 2002-03-19 20:18:42 +00:00
ktr.h Wrap the arguments to CTR6() in parentheses so that the u_long casts work 2002-04-01 19:44:13 +00:00
ktrace.h Remove __P 2002-03-19 20:18:42 +00:00
libkern.h Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-23 08:46:52 +00:00
linedisc.h Here follows the new kernel dumping infrastructure. 2002-03-31 22:37:00 +00:00
link_aout.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
link_elf.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
linker.h Change linker_reference_module() so that it's passed a struct 2002-04-10 01:13:57 +00:00
linker_set.h With this commit, I hereby pronounce gensetdefs past its use-by date. 2001-06-13 10:58:39 +00:00
lock.h Add a new mtx_init option "MTX_DUPOK" which allows duplicate acquires of locks 2002-03-27 09:23:41 +00:00
lockf.h Remove __P 2002-03-19 20:18:42 +00:00
lockmgr.h Remove __P 2002-03-19 20:18:42 +00:00
malloc.h Remove malloc_type's ks_limit. 2002-04-15 04:05:53 +00:00
mbuf.h Get rid of the twisted MFREE() macro entirely. 2002-02-05 02:00:56 +00:00
mchain.h Add the following functions/macros to support byte order conversions and 2002-02-27 17:16:18 +00:00
md4.h Import kernel part of SMB/CIFS requester. 2001-04-10 07:59:06 +00:00
md5.h Remove __P 2002-03-19 20:18:42 +00:00
mdioctl.h Actually make use of the md_version field of 'struct mdio'. In order 2001-12-20 06:38:21 +00:00
memrange.h Make the MTRR code a bit more defensive - this should help people 2002-04-14 20:19:13 +00:00
mman.h Remove __P 2002-03-19 20:18:42 +00:00
module.h - Lock down the ``module'' structure by adding an SX lock that is used by 2002-03-18 07:45:30 +00:00
mount.h Commit the good prototype for nmount(2). 2002-03-26 16:32:46 +00:00
mouse.h Minor changes: 2002-03-24 03:07:07 +00:00
msg.h Remove __P 2002-03-19 20:18:42 +00:00
msgbuf.h Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-23 08:46:52 +00:00
mtio.h Fix a typo in a comment field. 2002-01-21 11:10:32 +00:00
mutex.h Change mtx_init() to now take an extra argument. The third argument is 2002-04-04 20:52:27 +00:00
namei.h Remove __P 2002-03-19 20:18:42 +00:00
nlist_aout.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
param.h Stop exporting ntohl(), ntohs(), htonl(), and htons() to userland in 2002-04-10 10:36:23 +00:00
pciio.h style(9) the structure definitions. 2001-09-05 01:22:14 +00:00
pcpu.h Embed a struct vmmeter in the per-cpu structure and add a macro, 2002-04-04 21:38:47 +00:00
pioctl.h Add the as-yet-unused S_ALLSTOPS which I forgot in previous commit. 2001-11-02 23:15:13 +00:00
pipe.h First rev at making pipe(2) pipe's MPsafe. 2002-02-27 07:35:59 +00:00
poll.h Remove __P 2002-03-19 20:18:42 +00:00
posix4.h Remove __P. 2002-03-19 22:20:14 +00:00
power.h Add generalized power profile code. 2002-03-04 18:46:13 +00:00
priority.h style(9) the structure definitions. 2001-09-05 01:22:14 +00:00
proc.h Moved signal handling and rescheduling from userret() to ast() so that 2002-04-04 17:49:48 +00:00
procfs.h Use explicit sizes for the prpsinfo command length string so that 2001-08-16 08:35:51 +00:00
protosw.h Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-23 08:46:52 +00:00
ptio.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ptrace.h Implement PT_IO (read / write arbitrary amounts of data or text). 2002-03-16 02:40:02 +00:00
queue.h Remove __P 2002-03-19 20:18:42 +00:00
random.h Provide infrastructure for harvesting SWI entropy. 2002-03-03 20:09:42 +00:00
reboot.h Add new boot flag to i386 boot: -p. 2001-12-10 20:02:22 +00:00
regression.h Remove __P 2002-03-19 20:18:42 +00:00
resource.h Remove __P 2002-03-19 20:18:42 +00:00
resourcevar.h Remove __P 2002-03-19 20:18:42 +00:00
rman.h Add a rman_reserve_resource_bound() function that takes an additional 2001-12-21 21:40:55 +00:00
rtprio.h Remove __P 2002-03-19 20:18:42 +00:00
runq.h KSE Milestone 2 2001-09-12 08:38:13 +00:00
sbuf.h Replace spaces after #defines with tabs; this makes all #defines 2002-01-09 07:29:28 +00:00
select.h Do not recursively include <sys/selinfo.h> from <sys/select.h>; all in-tree 2001-01-20 03:11:47 +00:00
selinfo.h Remove __P 2002-03-19 20:18:42 +00:00
sem.h Remove __P 2002-03-19 20:18:42 +00:00
sema.h Added used includes. <sys/_lock.h> is a prerequisite for <sys/_mutex.h>, 2001-10-10 10:26:07 +00:00
semaphore.h Remove __P. 2002-03-19 22:20:14 +00:00
shm.h Remove __P 2002-03-19 20:18:42 +00:00
signal.h Remove __P 2002-03-19 20:18:42 +00:00
signalvar.h Moved signal handling and rescheduling from userret() to ast() so that 2002-04-04 17:49:48 +00:00
smp.h Add needed includes of machine/smp.h, remove nested include in sys/smp.h 2002-03-07 04:43:51 +00:00
snoop.h Move the kernel stuff out of snoop.h. It was only there because some 2001-07-25 14:47:56 +00:00
socket.h Remove __P 2002-03-19 20:18:42 +00:00
socketvar.h There's only one socket zone so we don't need to remember it 2002-04-08 03:04:22 +00:00
sockio.h Style consistency fix for MAC ioctls added previously. 2002-02-10 16:55:35 +00:00
soundcard.h Remove __P 2002-03-19 20:18:42 +00:00
stat.h Remove __P 2002-03-19 20:18:42 +00:00
stdint.h o Implement <sys/_types.h>, a new header for storing types that are 2002-04-01 08:12:25 +00:00
sx.h - Make this compile if INVARIANTS support is not enabled. 2002-04-02 18:18:56 +00:00
syscall.h Regen 2002-04-14 05:33:58 +00:00
syscall.mk Regen 2002-04-14 05:33:58 +00:00
sysctl.h Here follows the new kernel dumping infrastructure. 2002-03-31 22:37:00 +00:00
sysent.h Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-23 08:46:52 +00:00
syslimits.h After one too many PRs on the subject, bite the bullet and define IOV_MAX 2001-06-18 20:24:54 +00:00
syslog.h Remove __P 2002-03-19 20:18:42 +00:00
sysproto.h Regen 2002-04-14 05:33:58 +00:00
systm.h Move the CTASSERT macro from MD code to systm.h alongside KASSERT so other 2002-04-01 21:55:00 +00:00
taskqueue.h Revert the reindentation of struct task's definition from rev 1.4. 2001-10-28 16:19:34 +00:00
termios.h Remove __P 2002-03-19 20:18:42 +00:00
time.h Take the "tickadj" element out of struct clockinfo. Our adjtime(2) 2002-04-15 12:11:06 +00:00
timeb.h Remove __P 2002-03-19 20:18:42 +00:00
timepps.h Remove __P 2002-03-19 20:18:42 +00:00
timers.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
times.h Remove __P 2002-03-19 20:18:42 +00:00
timespec.h This file declares `struct timespec' so that we can have a single, 2001-01-23 04:44:04 +00:00
timetc.h Remove __P 2002-03-19 20:18:42 +00:00
timex.h Remove __P 2002-03-19 20:18:42 +00:00
tty.h Fixed -Wshadow warnings by renaming ttysleep()'s `timeout' parameter to 2002-03-27 03:52:04 +00:00
ttychars.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ttycom.h Remove the TABLDISC line discipline number, it's not in the tree 2000-01-29 16:47:35 +00:00
ttydefaults.h Kernel support for erase2 character. 2000-11-28 20:03:23 +00:00
ttydev.h Add B921600 (yes, some serial ports can do this, but generic sio not support 2001-06-20 03:26:41 +00:00
types.h Remove the hack for segsz_t from <sys/types.h>; use the normal 2002-04-10 15:58:13 +00:00
ucontext.h Add getcontext, setcontext, makecontext, and swapcontext prototypes 2002-01-10 02:44:30 +00:00
ucred.h Minor style cleanup. Remove unneeded includes, and correct or add 2002-04-07 03:59:31 +00:00
uio.h Remove __P 2002-03-19 20:18:42 +00:00
un.h Remove __P 2002-03-19 20:18:42 +00:00
unistd.h Make RFPPWAIT a kernel-only flag. Programs desiring this feature should 2001-12-19 00:55:13 +00:00
unpcb.h style(9) the structure definitions. 2001-09-05 01:22:14 +00:00
user.h Correct KINFO_PROC_SIZE for sparc64 due to segsz_t change. 2002-04-06 08:30:05 +00:00
utsname.h Round 1 of Brucification inspired changes. 2001-03-24 08:37:56 +00:00
vmmeter.h Add mibs to hold the number of forks since boot. New mibs are: 2001-01-23 14:32:01 +00:00
vnioctl.h Fix a bug in the block number calculation for VN disks with a sector 1999-09-17 05:34:00 +00:00
vnode.h Add a filesystem driver for the Universal Disk Format. For more info, 2002-04-14 16:36:49 +00:00
wait.h Remove __P 2002-03-19 20:18:42 +00:00
xrpuio.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00