diff options
author | avg <avg@FreeBSD.org> | 2010-09-30 17:05:23 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2010-09-30 17:05:23 +0000 |
commit | eca696eeba3626081774117ce5b9d924281c15e2 (patch) | |
tree | 75affb3e2ec0dd8c1da7f724afb6bcd53ff06d3d /sys | |
parent | 1f20beb47f6f8b94b4b99fe9718b2c311e8f9155 (diff) | |
download | FreeBSD-src-eca696eeba3626081774117ce5b9d924281c15e2.zip FreeBSD-src-eca696eeba3626081774117ce5b9d924281c15e2.tar.gz |
there must be only one SYSINIT with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY order
SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY should only be used to call
scheduler() function which turns the initial thread into swapper proper
and thus there is no further SYSINIT processing.
Other SYSINITs with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY may get ordered
after scheduler() and thus never executed. That particular relative
order is semi-arbitrary.
Thus, change such places to use SI_ORDER_MIDDLE.
Also, use SI_ORDER_MIDDLE instead of correct, but less appealing,
SI_ORDER_ANY - 1.
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/gdb/gdb_cons.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_ntptime.c | 2 | ||||
-rw-r--r-- | sys/sys/sched.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/gdb/gdb_cons.c b/sys/gdb/gdb_cons.c index 1c7bdea..2e01cd4 100644 --- a/sys/gdb/gdb_cons.c +++ b/sys/gdb/gdb_cons.c @@ -126,7 +126,7 @@ oktousecallout(void *data __unused) { calloutok = 1; } -SYSINIT(gdbhack, SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY, oktousecallout, NULL); +SYSINIT(gdbhack, SI_SUB_RUN_SCHEDULER, SI_ORDER_MIDDLE, oktousecallout, NULL); static void gdb_cnputc(struct consdev *cp, int c) diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index c427ac4..f817613 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -1035,5 +1035,5 @@ start_periodic_resettodr(void *arg __unused) periodic_resettodr, NULL); } -SYSINIT(periodic_resettodr, SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY - 1, +SYSINIT(periodic_resettodr, SI_SUB_RUN_SCHEDULER, SI_ORDER_MIDDLE, start_periodic_resettodr, NULL); diff --git a/sys/sys/sched.h b/sys/sys/sched.h index 92dd4c4..f9c88c5 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -173,7 +173,7 @@ static void name ## _add_proc(void *dummy __unused) \ #name, CTLTYPE_LONG|CTLFLAG_RD|CTLFLAG_MPSAFE, \ ptr, 0, sysctl_dpcpu_long, "LU", descr); \ } \ -SYSINIT(name, SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY, name ## _add_proc, NULL); +SYSINIT(name, SI_SUB_RUN_SCHEDULER, SI_ORDER_MIDDLE, name ## _add_proc, NULL); #define SCHED_STAT_DEFINE(name, descr) \ DPCPU_DEFINE(unsigned long, name); \ |