409c65ce0b
Summary: - This commit fixes global IRQ control logic - In previous implementation, g_cpu_irqset for a remote CPU was set in sched_add_readytorun(), sched_remove_readytorun() and up_schedule_sigaction() - In this implementation, they are removed. - Instead, in the pause handler, call enter_critical_setion() which will call up_cpu_paused() then acquire g_cpu_irqlock - So if a new task with irqcount > 1 restarts on the remote CPU, the CPU will only hold a critical section. Thus, the issue such as 'POSSIBLE FOR TWO CPUs TO HOLD A CRITICAL SECTION' could be resolved. - Fix nxsched_resume_scheduler() so that it does not call spin_clrbit() if a CPU does not hold a g_cpu_irqset - Fix nxtask_exit() so that it acquires g_cpu_irqlock - Update TODO Impact: - All SMP implementations Testing: - Tested with smp, ostest with the following configurations - Tested with spresense:wifi_smp (NCPUS=2,4) - Tested with sabre-6quad:smp (QEMU, dev board) - Tested with maix-bit:smp (QEMU) - Tested with esp32-core:smp (QEMU) - Tested with lc823450-xgevk:rndis Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> |
||
---|---|---|
.. | ||
exit.c | ||
Make.defs | ||
spawn.h | ||
task_activate.c | ||
task_atexit.c | ||
task_cancelpt.c | ||
task_create.c | ||
task_delete.c | ||
task_execv.c | ||
task_exit.c | ||
task_exithook.c | ||
task_getgroup.c | ||
task_getpid.c | ||
task_init.c | ||
task_onexit.c | ||
task_posixspawn.c | ||
task_prctl.c | ||
task_recover.c | ||
task_reparent.c | ||
task_restart.c | ||
task_setcancelstate.c | ||
task_setcanceltype.c | ||
task_setup.c | ||
task_spawn.c | ||
task_spawnparms.c | ||
task_start.c | ||
task_starthook.c | ||
task_terminate.c | ||
task_testcancel.c | ||
task_vfork.c | ||
task.h |