Index: kern/kern_mib.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_mib.c,v retrieving revision 1.65 diff -u -r1.65 kern_mib.c --- kern/kern_mib.c 30 Apr 2003 12:57:39 -0000 1.65 +++ kern/kern_mib.c 26 May 2003 05:39:06 -0000 @@ -51,6 +51,7 @@ #include #include #include +#include #include SYSCTL_NODE(, 0, sysctl, CTLFLAG_RW, 0, SYSCTL_NODE(, OID_AUTO, regression, CTLFLAG_RW, 0, "Regression test MIB"); #endif + +SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RW, 0, "SCHED"); + +SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, sched_name, 0, + "Current scheduler"); SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD, osrelease, 0, "Operating system release"); Index: kern/sched_4bsd.c =================================================================== RCS file: /home/ncvs/src/sys/kern/sched_4bsd.c,v retrieving revision 1.18 diff -u -r1.18 sched_4bsd.c --- kern/sched_4bsd.c 30 Apr 2003 12:57:39 -0000 1.18 +++ kern/sched_4bsd.c 26 May 2003 05:34:32 -0000 @@ -46,9 +46,9 @@ #include #include #include +#include #include #include -#include #include /* @@ -87,6 +87,8 @@ SYSINIT(sched_setup, SI_SUB_KICK_SCHEDULER, SI_ORDER_FIRST, sched_setup, NULL) +char sched_name[] = "4bsd"; + /* * Global run queue. */ @@ -109,7 +111,7 @@ return (0); } -SYSCTL_PROC(_kern, OID_AUTO, quantum, CTLTYPE_INT|CTLFLAG_RW, +SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, CTLTYPE_INT|CTLFLAG_RW, 0, sizeof sched_quantum, sysctl_kern_quantum, "I", "Roundrobin scheduling quantum in microseconds"); Index: kern/sched_ule.c =================================================================== RCS file: /home/ncvs/src/sys/kern/sched_ule.c,v retrieving revision 1.34 diff -u -r1.34 sched_ule.c --- kern/sched_ule.c 2 May 2003 06:18:55 -0000 1.34 +++ kern/sched_ule.c 26 May 2003 05:30:29 -0000 @@ -34,10 +34,10 @@ #include #include #include +#include #include #include #include -#include #include #include #ifdef DDB @@ -60,7 +60,7 @@ static void sched_setup(void *dummy); SYSINIT(sched_setup, SI_SUB_RUN_QUEUE, SI_ORDER_FIRST, sched_setup, NULL) -static SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RW, 0, "SCHED"); +char sched_name[] = "ule"; static int sched_strict; SYSCTL_INT(_kern_sched, OID_AUTO, strict, CTLFLAG_RD, &sched_strict, 0, ""); Index: sys/sched.h =================================================================== RCS file: /home/ncvs/src/sys/sys/sched.h,v retrieving revision 1.4 diff -u -r1.4 sched.h --- sys/sched.h 11 Apr 2003 03:39:06 -0000 1.4 +++ sys/sched.h 26 May 2003 05:31:09 -0000 @@ -91,5 +91,10 @@ extern struct kg_sched *ksegrp0_sched; extern struct p_sched *proc0_sched; extern struct td_sched *thread0_sched; +extern const char *sched_name; + +#ifdef SYSCTL_DECL +SYSCTL_DECL(_kern_sched); +#endif #endif /* !_SYS_SCHED_H_ */