Implement kern.hardclock_ticks.

This commit is contained in:
rpaulo 2005-09-06 02:36:17 +00:00
parent 12c72179ee
commit f305bcafe3
2 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_sysctl.c,v 1.52 2005/08/24 16:00:54 simonb Exp $ */
/* $NetBSD: init_sysctl.c,v 1.53 2005/09/06 02:36:17 rpaulo Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.52 2005/08/24 16:00:54 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.53 2005/09/06 02:36:17 rpaulo Exp $");
#include "opt_sysv.h"
#include "opt_multiprocessor.h"
@ -338,6 +338,12 @@ SYSCTL_SETUP(sysctl_kern_setup, "sysctl kern subtree setup")
sysctl_kern_clockrate, 0, NULL,
sizeof(struct clockinfo),
CTL_KERN, KERN_CLOCKRATE, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_INT, "hardclock_ticks",
SYSCTL_DESCR("Number of hardclock ticks"),
NULL, 0, &hardclock_ticks, sizeof(hardclock_ticks),
CTL_KERN, KERN_HARDCLOCK_TICKS, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_STRUCT, "vnode",

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysctl.h,v 1.139 2005/08/07 12:30:01 blymn Exp $ */
/* $NetBSD: sysctl.h,v 1.140 2005/09/06 02:36:17 rpaulo Exp $ */
/*
* Copyright (c) 1989, 1993
@ -270,7 +270,8 @@ struct ctlname {
#define KERN_FILE2 77 /* struct: file entries */
#define KERN_VERIEXEC 78 /* node: verified exec */
#define KERN_CP_ID 79 /* struct: cpu id numbers */
#define KERN_MAXID 80 /* number of valid kern ids */
#define KERN_HARDCLOCK_TICKS 80 /* int: number of hardclock ticks */
#define KERN_MAXID 81 /* number of valid kern ids */
#define CTL_KERN_NAMES { \
@ -354,6 +355,7 @@ struct ctlname {
{ "file2", CTLTYPE_STRUCT }, \
{ "veriexec", CTLTYPE_NODE }, \
{ "cp_id", CTLTYPE_STRUCT }, \
{ "hardclock_ticks", CTLTYPE_INT }, \
}
/*