PERFORCE change 100189 for review

Chris Jones cdjones at FreeBSD.org
Wed Jun 28 07:59:53 UTC 2006


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

Change 100189 by cdjones at cdjones-impulse on 2006/06/28 07:59:04

	Put sched.h's prototypes in place.

Affected files ...

.. //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#2 edit
.. //depot/projects/soc2006/cdjones_jail/src/sys/sys/jail.h#3 edit

Differences ...

==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#2 (text+ko) ====

@@ -46,6 +46,7 @@
 #include <sys/sysproto.h>
 #include <sys/turnstile.h>
 #include <sys/vmmeter.h>
+#include <sys/kthread.h>
 #ifdef KTRACE
 #include <sys/uio.h>
 #include <sys/ktrace.h>
@@ -54,3 +55,195 @@
 #ifdef HWPMC_HOOKS
 #include <sys/pmckern.h>
 #endif
+
+/*
+static struct kproc_desc sched_kp = {
+  "schedcpu",
+  schedcpu_thread,
+  NULL
+};
+SYSINIT(schedcpu, SI_SUB_RUN_SCHEDULER, SI_ORDER_FIRST, kproc_start, &sched_kp)
+*/
+
+static void sched_setup(void *dummy);
+SYSINIT(sched_setup, SI_SUB_RUN_QUEUE, SI_ORDER_FIRST, sched_setup, NULL)
+
+SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RD, 0, "Scheduler");
+
+SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "hier", 0,
+	      "Scheduler name");
+
+void
+sched_setup(void *dummy)
+{
+  /* TODO */
+}
+
+/* Common external interface stuff goes here.
+   (from sys/sched.h)
+*/
+
+void
+schedinit(void)
+{
+
+  proc0.p_sched = NULL;
+  ksegrp0.kg_sched = &kg_sched0;
+  thread0.td_sched = &kse0;
+  kse0.ke_thread = &thread0;
+  kse0.ke_state = KES_THREAD;
+  kg_sched0.skg_concurrency = 1;
+  kg_sched0.skg_avail_openings = 0; /* we are already running */
+}
+
+int
+sched_load(void)
+{
+
+}
+
+int
+sched_rr_internal(void)
+{
+
+}
+
+int
+sched_runnable(void)
+{
+
+}
+
+void
+sched_exit(struct proc *p, struct thread *childtd)
+{
+}
+
+
+void
+sched_fork(struct thread *td, struct thread *childtd)
+{
+}
+
+void
+sched_class(struct ksegrp *kg, int class)
+{
+}
+
+void
+sched_exit_ksegrp(struct ksegrp *kg, struct thread *childtd)
+{
+}
+
+void
+sched_fork_ksegrp(struct ksegrp *kg, struct thread *childtd)
+{
+}
+
+void
+sched_nice(struct proc *p, int nice)
+{
+}
+
+void
+sched_exit_thread(struct thread *td, struct thread *child)
+{
+}
+
+void
+sched_fork_thread(struct thread *td, struct thread *child)
+{
+}
+
+fixpt_t
+sched_pctcpu(struct thread *td)
+{
+}
+
+void
+sched_prio(struct thread *td, u_char prio)
+{
+}
+
+void
+sched_lend_prio(struct thread *td, u_char prio)
+{
+}
+
+void
+sched_sleep(struct thread *td)
+{
+}
+
+void
+sched_switch(struct thread *td, struct thread *newtd, int flags)
+{
+}
+
+void
+sched_unlend_prio(struct thread *td, u_char prio)
+{
+}
+
+void
+sched_userret(struct thread *td)
+{
+}
+
+void
+sched_wakeup(struct thread *td)
+{
+}
+
+void
+sched_add(struct thread *td, int flags)
+{
+}
+
+void
+sched_clock(struct thread *td)
+{
+}
+
+void
+sched_rem(struct thread *td)
+{
+}
+
+void
+sched_tick(void)
+{
+}
+
+void
+sched_relinquish(struct thread *td)
+{
+}
+
+void
+sched_bind(struct thread *td, int cpu)
+{
+}
+
+void
+sched_unbind(struct thread *td)
+{
+}
+
+void
+sched_sizeof_ksegrp(void)
+{
+  return (sizeof(struct ksegrp) + sizeof(struct kg_sched));
+}
+
+void
+sched_sizeof_proc(void)
+{
+  return (sizeof(struct proc));
+}
+
+void
+sched_sizeof_thread(void)
+{
+  return (sizeof(struct thread) + sizeof(struct td_sched));
+}

==== //depot/projects/soc2006/cdjones_jail/src/sys/sys/jail.h#3 (text+ko) ====



More information about the p4-projects mailing list