Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2008 07:34:25 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137474 for review
Message-ID:  <200803120734.m2C7YPch012551@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137474

Change 137474 by peter@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"
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803120734.m2C7YPch012551>