summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_ntptime.c
Commit message (Collapse)AuthorAgeFilesLines
* Introduce std_pps_ioctl() to automagically DTRT.phk1998-06-131-16/+61
| | | | Add scaling capability to timex.offset, ntpd-4.0.73 will support this.
* Add a tc_ prefix to struct timecounter members.phk1998-06-091-2/+2
| | | | Urged by: bde
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* Replace TOD clock code with more systematic approach.phk1998-02-201-24/+27
| | | | | | | | | | | | | | | Highlights: * Simple model for underlying hardware. * Hardware basis for timekeeping can be changed on the fly. * Only one hardware clock responsible for TOD keeping. * Provides a real nanotime() function. * Time granularity: .232E-18 seconds. * Frequency granularity: .238E-12 s/s * Frequency adjustment is continuous in time. * Less overhead for frequency adjustment. * Improves xntpd performance. Reviewed by: bde, bde, bde
* unifdef -UEXT_CLOCK fdef -UEXT_CLOCK, it is irrelevant.phk1998-02-151-21/+3
| | | | Fix a couple of nits from bde while here anyway.
* Make POWERFAIL_NMI, PPS_SYNC and NATM new style options.eivind1998-01-311-0/+3
| | | | This also fixes a couple of defunct options; submitted by bde.
* Move almost all the ntp related stuff from kern_clock.c tophk1998-01-141-21/+575
| | | | | | kern_ntptime.c. The only bit left over is that which is executed in all calls to hardclock(). Various cleanups and staticizing along the road.
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-061-6/+6
| | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
* Update our kernel ntp code to the latest from David Mills. The main changejhay1996-12-301-1/+4
| | | | | is the addition of the FLL code, which is used by the latest versions of xntpd. The kernel PPS code is also updated, although I can't test that yet.
* Removed unnecessary #includes of vm stuff. Most of them were oncebde1995-12-061-1/+0
| | | | | | | prerequisites for <sys/sysctl.h>. subr_prof.c: Also replaced #include of <sys/user.h> by #include of <sys/resourcevar.h>.
* A major sweep over the sysctl stuff.phk1995-12-041-1/+1
| | | | | | | | | | | | | Move a lot of variables home to their own code (In good time before xmas :-) Introduce the string descrition of format. Add a couple more functions to poke into these marvels, while I try to decide what the correct interface should look like. Next is adding vars on the fly, and sysctl looking at them too. Removed a tine bit of defunct and #ifdefed notused code in swapgeneric.
* Move KERN_NTP to a more suitable file.phk1995-11-141-13/+8
|
* Included <sys/sysproto.h> to get central declarations for syscall argsbde1995-11-121-0/+3
| | | | | | | | | | structs and prototypes for syscalls. Ifdefed duplicated decentralized declarations of args structs. It's convenient to have this visible but they are hard to maintain. Some are already different from the central declarations. 4.4lite2 puts them in comments in the function headers but I wanted to avoid the large changes for that.
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* Add vm/vm.h for complete sysctl type.ache1994-09-191-1/+1
| | | | | Remove wrong time declaration, already have correct in kernel.h (kern_ntptime not compiled without this changes)
* Reversed last revision which was a mistake.dfr1994-09-191-1/+0
|
* Added msdosfs.dfr1994-09-191-0/+1
| | | | Obtained from: NetBSD
* Redo Kernel NTP PLL support, kernel side.wollman1994-09-181-0/+269
This code is mostly taken from the 1.1 port (which was in turn taken from Dave Mills's kern.tar.Z example). A few significant differences: 1) ntp_gettime() is now a MIB variable rather than a system call. A few fiddles are done in libc to make it behave the same. 2) mono_time does not participate in the PLL adjustments. 3) A new interface has been defined (in <machine/clock.h>) for doing possibly machine-dependent things around the time of the clock update. This is used in Pentium kernels to disable interrupts, set `time', and reset the CPU cycle counter as quickly as possible to avoid jitter in microtime(). Measurements show an apparent resolution of a bit more than 8.14usec, which is reasonable given system-call overhead.
OpenPOWER on IntegriCloud