struct schedstate_percpu contains clockintr pointers. struct
clockintr is not defined int userspace, so we need to conceal
the schedstate_percpu definition from userspace. Nothing in
base userspace currently uses the struct.
I think we should leave <sys/queue.h> in place for now. Something
might depend upon it to compile. We could circle back move it under
_KERNEL in a separate patch.
Preferences? ok?
Index: sched.h
===================================================================
RCS file: /cvs/src/sys/sys/sched.h,v
diff -u -p -r1.67 sched.h
--- sched.h 24 Oct 2023 13:20:11 -0000 1.67
+++ sched.h 29 Oct 2023 20:44:50 -0000
@@ -88,6 +88,15 @@
#define CP_IDLE 5
#define CPUSTATES 6
+struct cpustats {
+ uint64_t cs_time[CPUSTATES]; /* CPU state statistics */
+ uint64_t cs_flags; /* see below */
+};
+
+#define CPUSTATS_ONLINE 0x0001 /* CPU is schedulable */
+
+#ifdef _KERNEL
+
#define SCHED_NQS 32 /* 32 run queues. */
struct clockintr;
@@ -123,15 +132,6 @@ struct schedstate_percpu {
* without delay */
u_char spc_smrgp; /* this CPU's view of grace period */
};
-
-struct cpustats {
- uint64_t cs_time[CPUSTATES]; /* CPU state statistics */
- uint64_t cs_flags; /* see below */
-};
-
-#define CPUSTATS_ONLINE 0x0001 /* CPU is schedulable */
-
-#ifdef _KERNEL
/* spc_flags */
#define SPCF_SEENRR 0x0001 /* process has seen roundrobin() */