nuttx/sched/sched
Masayuki Ishikawa 4cc38caba9 sched: Fix nx_waitid(), nx_waitpid(), nxtask_exithook() for SMP
Summary:
- I noticed waitpid_test stops with lc823450-xgevk:rndis
- The condition was CONFIG_DEBUG_ASSERTION=y
- Actually, the child task sent SIGCHILD but the parent couldn't catch the signal
- Then, I found that nx_waitid(), nx_waitpid() use sched_lock()
- However, a parent task and a child task are running on different CPUs
- So, sched_lock() is not enough and need to use a critical section
- Also, signal handling in nxtask_exithook() must be done in a critical section

Impact:
- SMP only

Testing:
- Tested with ostest with the following configurations
- lc823450-xgevk:rndis (CONFIG_DEBUG_ASSERTION=y and n)
- spresense:smp
- spresense:wifi_smp (NCPUS=2 and 4)
- sabre-6quad:smp (QEMU)
- esp32-core:smp (QEMU)
- maix-bit:smp (QEMU)
- sim:smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-14 16:31:49 -08:00
..
Make.defs sched: sched: Remove sched_tasklistlock.c for SMP 2020-11-10 23:18:08 -08:00
sched_addblocked.c sched: sched: Remove sched_tasklistlock.c for SMP 2020-11-10 23:18:08 -08:00
sched_addprioritized.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_addreadytorun.c sched: sched: Remove sched_tasklistlock.c for SMP 2020-11-10 23:18:08 -08:00
sched_continue.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_cpuload_oneshot.c Make more OS internal names consistent 2020-05-10 22:47:07 +08:00
sched_cpuload_period.c Change all files come from Xiaomi/Pinecone to Apache License 2.0 2020-08-22 17:37:21 -06:00
sched_cpuload.c
sched_cpupause.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_cpuselect.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_critmonitor.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_foreach.c Run nxstyle against all .c and .h files modified by this PR. 2020-05-09 14:19:08 -03:00
sched_get_stackinfo.c Run nxstyle against all .c and .h files modified by this PR. 2020-05-09 14:19:08 -03:00
sched_getaffinity.c
sched_getcpu.c
sched_getfiles.c Run nxstyle against all .c and .h files modified by this PR. 2020-05-09 14:19:08 -03:00
sched_getparam.c
sched_getscheduler.c
sched_getsockets.c Run nxstyle against all .c and .h files modified by this PR. 2020-05-09 14:19:08 -03:00
sched_getstreams.c libc/stdio: Allocate file_struct dynamically 2020-09-11 17:58:17 +08:00
sched_gettcb.c libc/stdio: Allocate file_struct dynamically 2020-09-11 17:58:17 +08:00
sched_idletask.c
sched_lock.c sched: Fix sched_lock() logic for SMP 2020-10-26 22:22:31 -07:00
sched_lockcount.c
sched_mergepending.c sched: sched: Remove sched_tasklistlock.c for SMP 2020-11-10 23:18:08 -08:00
sched_mergeprioritized.c sched: sched: Remove sched_tasklistlock.c for SMP 2020-11-10 23:18:08 -08:00
sched_note.c Fix build break when CONFIG_TASK_NAME_SIZE == 0 2020-11-01 18:46:26 -08:00
sched_processtimer.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_releasetcb.c Revert "sched/sched/sched_releasetcb.c: Handle custom stack allocations." 2020-07-07 00:21:46 +01:00
sched_removeblocked.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_removereadytorun.c sched: sched: Remove sched_tasklistlock.c for SMP 2020-11-10 23:18:08 -08:00
sched_reprioritize.c Run all .c and .h files modifed by the PR though nxstyle. 2020-05-09 16:58:42 -03:00
sched_resumescheduler.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_roundrobin.c Sources and Docs: Fix typos and nxstyle issues 2020-10-02 04:54:52 +02:00
sched_rrgetinterval.c
sched_self.c Run nxstyle against all .c and .h files modified by this PR. 2020-05-09 14:19:08 -03:00
sched_setaffinity.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_setparam.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_setpriority.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_setscheduler.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_sporadic.c sched/wdog: Remove MAX_WDOGPARMS and related stuff 2020-08-14 08:19:50 -06:00
sched_suspend.c sched/: Make more naming consistent 2020-05-16 13:39:03 -03:00
sched_suspendscheduler.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_thistask.c arch, include, sched : Refactor ARCH_GLOBAL_IRQDISABLE related code 2020-09-03 10:20:20 +08:00
sched_timerexpiration.c Run all .c and .h files modifed by the PR though nxstyle. 2020-05-09 16:58:42 -03:00
sched_unlock.c sched: Fix DEBUGASSERT() in sched_unlock() for SMP 2020-10-26 22:22:31 -07:00
sched_verifytcb.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched_wait.c
sched_waitid.c sched: Fix nx_waitid(), nx_waitpid(), nxtask_exithook() for SMP 2020-11-14 16:31:49 -08:00
sched_waitpid.c sched: Fix nx_waitid(), nx_waitpid(), nxtask_exithook() for SMP 2020-11-14 16:31:49 -08:00
sched_yield.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
sched.h sched: sched: Remove sched_tasklistlock.c for SMP 2020-11-10 23:18:08 -08:00