PERFORCE change 137474 for review

Peter Wemm peter at FreeBSD.org
Wed Mar 12 07:34:26 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=137474

Change 137474 by peter at peter_overcee on 2008/03/12 07:33:43

	Carry out 'temporary' threat and move sched_newthread as promised.
	'struct td_sched' is now totally private to sched_*.

Affected files ...

.. //depot/projects/bike_sched/sys/kern/kern_switch.c#11 edit
.. //depot/projects/bike_sched/sys/kern/sched_4bsd.c#17 edit
.. //depot/projects/bike_sched/sys/kern/sched_ule.c#17 edit

Differences ...

==== //depot/projects/bike_sched/sys/kern/kern_switch.c#11 (text+ko) ====

@@ -567,25 +567,4 @@
 			*idx = (pri + 1) % RQ_NQS;
 	}
 }
-
-/****** functions that are temporarily here ***********/
-#include <vm/uma.h>
-
-/*
- * thread is being either created or recycled.
- * Fix up the per-scheduler resources associated with it.
- * Called from:
- *  sched_fork()
- *  thread_dtor()  (*may go away)
- *  thread_init()  (*may go away)
- */
-void
-sched_newthread(struct thread *td)
-{
-	struct td_sched *ts;
-
-	ts = TD_TO_TS(td);
-	bzero(ts, sizeof(*ts));
-}
-
 #endif /* KERN_SWITCH_INCLUDE */

==== //depot/projects/bike_sched/sys/kern/sched_4bsd.c#17 (text+ko) ====

@@ -1374,5 +1374,24 @@
 	THREAD_LOCK_ASSERT(td, MA_OWNED | MA_NOTRECURSED);
 }
 
+#include <vm/uma.h>
+
+/*
+ * thread is being either created or recycled.
+ * Fix up the per-scheduler resources associated with it.
+ * Called from:
+ *  sched_fork()
+ *  thread_dtor()  (*may go away)
+ *  thread_init()  (*may go away)
+ */
+void
+sched_newthread(struct thread *td)
+{
+	struct td_sched *ts;
+
+	ts = TD_TO_TS(td);
+	bzero(ts, sizeof(*ts));
+}
+
 #define KERN_SWITCH_INCLUDE 1
 #include "kern/kern_switch.c"

==== //depot/projects/bike_sched/sys/kern/sched_ule.c#17 (text+ko) ====

@@ -2655,5 +2655,25 @@
 static int ccpu = 0;
 SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, "");
 
+#include <vm/uma.h>
+
+/*
+ * thread is being either created or recycled.
+ * Fix up the per-scheduler resources associated with it.
+ * Called from:
+ *  sched_fork()
+ *  thread_dtor()  (*may go away)
+ *  thread_init()  (*may go away)
+ */
+void
+sched_newthread(struct thread *td)
+{
+	struct td_sched *ts;
+
+	ts = TD_TO_TS(td);
+	bzero(ts, sizeof(*ts));
+}
+
 #define KERN_SWITCH_INCLUDE 1
 #include "kern/kern_switch.c"
+


More information about the p4-projects mailing list