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
This commit is contained in:
parent
10b2a365a0
commit
7b9df13bcd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213305
@ -126,7 +126,7 @@ oktousecallout(void *data __unused)
|
|||||||
{
|
{
|
||||||
calloutok = 1;
|
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
|
static void
|
||||||
gdb_cnputc(struct consdev *cp, int c)
|
gdb_cnputc(struct consdev *cp, int c)
|
||||||
|
@ -1035,5 +1035,5 @@ start_periodic_resettodr(void *arg __unused)
|
|||||||
periodic_resettodr, NULL);
|
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);
|
start_periodic_resettodr, NULL);
|
||||||
|
@ -173,7 +173,7 @@ static void name ## _add_proc(void *dummy __unused) \
|
|||||||
#name, CTLTYPE_LONG|CTLFLAG_RD|CTLFLAG_MPSAFE, \
|
#name, CTLTYPE_LONG|CTLFLAG_RD|CTLFLAG_MPSAFE, \
|
||||||
ptr, 0, sysctl_dpcpu_long, "LU", descr); \
|
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) \
|
#define SCHED_STAT_DEFINE(name, descr) \
|
||||||
DPCPU_DEFINE(unsigned long, name); \
|
DPCPU_DEFINE(unsigned long, name); \
|
||||||
|
Loading…
Reference in New Issue
Block a user