Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern This is no place to attach the primary cpu. Things ...



details:   https://anonhg.NetBSD.org/src/rev/dd49ea746806
branches:  trunk
changeset: 769612:dd49ea746806
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Sep 16 01:03:52 2011 +0000

description:
This is no place to attach the primary cpu. Things go wrong from here because
for example it is missing its name.

diffstat:

 sys/kern/sched_m2.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r 8f66cdc1dfc7 -r dd49ea746806 sys/kern/sched_m2.c
--- a/sys/kern/sched_m2.c       Fri Sep 16 01:03:02 2011 +0000
+++ b/sys/kern/sched_m2.c       Fri Sep 16 01:03:52 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sched_m2.c,v 1.29 2009/11/22 19:09:16 mbalmer Exp $    */
+/*     $NetBSD: sched_m2.c,v 1.30 2011/09/16 01:03:52 christos Exp $   */
 
 /*
  * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sched_m2.c,v 1.29 2009/11/22 19:09:16 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sched_m2.c,v 1.30 2011/09/16 01:03:52 christos Exp $");
 
 #include <sys/param.h>
 
@@ -81,8 +81,6 @@
 void
 sched_rqinit(void)
 {
-       struct cpu_info *ci = curcpu();
-
        if (hz < 100) {
                panic("sched_rqinit: value of HZ is too low\n");
        }
@@ -93,8 +91,11 @@
        rt_ts = mstohz(100);                    /* ~100 ms */
        sched_precalcts();
 
+#ifdef notdef
+       /* Need to set the name etc. This does not belong here */
        /* Attach the primary CPU here */
-       sched_cpuattach(ci);
+       sched_cpuattach(curcpu());
+#endif
 
        sched_lwp_fork(NULL, &lwp0);
        sched_newts(&lwp0);



Home | Main Index | Thread Index | Old Index