sched: swap setting for g_npidhash
in case of crash in kmm_zalloc, and crash dump use nxsched_foreach() Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
aff700f8ca
commit
07b27cd199
|
@ -606,15 +606,17 @@ void nx_start(void)
|
|||
|
||||
/* Initialize the logic that determine unique process IDs. */
|
||||
|
||||
g_npidhash = 1 << LOG2_CEIL(CONFIG_PID_INITIAL_COUNT);
|
||||
while (g_npidhash <= CONFIG_SMP_NCPUS)
|
||||
i = 1 << LOG2_CEIL(CONFIG_PID_INITIAL_COUNT);
|
||||
while (i <= CONFIG_SMP_NCPUS)
|
||||
{
|
||||
g_npidhash <<= 1;
|
||||
i <<= 1;
|
||||
}
|
||||
|
||||
g_pidhash = kmm_zalloc(sizeof(*g_pidhash) * g_npidhash);
|
||||
g_pidhash = kmm_zalloc(sizeof(*g_pidhash) * i);
|
||||
DEBUGASSERT(g_pidhash);
|
||||
|
||||
g_npidhash = i;
|
||||
|
||||
/* IDLE Group Initialization **********************************************/
|
||||
|
||||
idle_group_initialize();
|
||||
|
|
Loading…
Reference in New Issue