Add tickadj to struct clockinfo, like NetBSD and OpenBSD.

NOTE: libc, time, kgmon and rpc.rstatd will have to be recompiled.
This commit is contained in:
John Hay 1997-06-24 18:21:09 +00:00
parent 3b5d3246bf
commit 5faa3121a9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=26897
7 changed files with 13 additions and 8 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.35 1997/03/22 20:34:21 mpp Exp $
* $Id: kern_clock.c,v 1.36 1997/04/26 11:46:12 peter Exp $
*/
/* Portions of this software are covered by the following: */
@ -1048,6 +1048,7 @@ sysctl_kern_clockrate SYSCTL_HANDLER_ARGS
*/
clkinfo.hz = hz;
clkinfo.tick = tick;
clkinfo.tickadj = tickadj;
clkinfo.profhz = profhz;
clkinfo.stathz = stathz ? stathz : hz;
return (sysctl_handle_opaque(oidp, &clkinfo, sizeof clkinfo, req));

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.35 1997/03/22 20:34:21 mpp Exp $
* $Id: kern_clock.c,v 1.36 1997/04/26 11:46:12 peter Exp $
*/
/* Portions of this software are covered by the following: */
@ -1048,6 +1048,7 @@ sysctl_kern_clockrate SYSCTL_HANDLER_ARGS
*/
clkinfo.hz = hz;
clkinfo.tick = tick;
clkinfo.tickadj = tickadj;
clkinfo.profhz = profhz;
clkinfo.stathz = stathz ? stathz : hz;
return (sysctl_handle_opaque(oidp, &clkinfo, sizeof clkinfo, req));

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_time.c 8.1 (Berkeley) 6/10/93
* $Id: kern_time.c,v 1.27 1997/06/01 09:01:07 peter Exp $
* $Id: kern_time.c,v 1.28 1997/06/01 09:05:19 peter Exp $
*/
#include <sys/param.h>
@ -413,7 +413,6 @@ settimeofday(p, uap, retval)
return (0);
}
extern int tickadj; /* "standard" clock skew, us./tick */
int tickdelta; /* current clock skew, us. per tick */
long timedelta; /* unapplied time correction, us. */
static long bigadj = 1000000; /* use 10x skew above bigadj us. */

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.35 1997/03/22 20:34:21 mpp Exp $
* $Id: kern_clock.c,v 1.36 1997/04/26 11:46:12 peter Exp $
*/
/* Portions of this software are covered by the following: */
@ -1048,6 +1048,7 @@ sysctl_kern_clockrate SYSCTL_HANDLER_ARGS
*/
clkinfo.hz = hz;
clkinfo.tick = tick;
clkinfo.tickadj = tickadj;
clkinfo.profhz = profhz;
clkinfo.stathz = stathz ? stathz : hz;
return (sysctl_handle_opaque(oidp, &clkinfo, sizeof clkinfo, req));

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)kernel.h 8.3 (Berkeley) 1/21/94
* $Id: kernel.h,v 1.31 1997/05/29 04:50:23 peter Exp $
* $Id: kernel.h,v 1.32 1997/06/22 16:04:20 peter Exp $
*/
#ifndef _SYS_KERNEL_H_
@ -66,6 +66,7 @@ extern struct timeval time; /* nonvolatile at ipl >= splclock() */
extern struct timezone tz; /* XXX */
extern int tick; /* usec per tick (1000000 / hz) */
extern int tickadj; /* "standard" clock skew, us./tick */
extern int hz; /* system clock's frequency */
extern int psratio; /* ratio: prof / stat */
extern int stathz; /* statistics clock's frequency */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)time.h 8.5 (Berkeley) 5/4/95
* $Id: time.h,v 1.13 1997/05/08 13:48:47 peter Exp $
* $Id: time.h,v 1.14 1997/05/13 10:58:14 peter Exp $
*/
#ifndef _SYS_TIME_H_
@ -125,6 +125,7 @@ struct itimerval {
struct clockinfo {
int hz; /* clock frequency */
int tick; /* micro-seconds per hz tick */
int tickadj; /* clock skew rate for adjtime() */
int stathz; /* statistics clock frequency */
int profhz; /* profiling clock frequency */
};

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)time.h 8.5 (Berkeley) 5/4/95
* $Id: time.h,v 1.13 1997/05/08 13:48:47 peter Exp $
* $Id: time.h,v 1.14 1997/05/13 10:58:14 peter Exp $
*/
#ifndef _SYS_TIME_H_
@ -125,6 +125,7 @@ struct itimerval {
struct clockinfo {
int hz; /* clock frequency */
int tick; /* micro-seconds per hz tick */
int tickadj; /* clock skew rate for adjtime() */
int stathz; /* statistics clock frequency */
int profhz; /* profiling clock frequency */
};