incubator-nuttx/sched/task
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 Move gettid() implementation to /libs/libc/unistd 2020-09-22 19:40:56 -07:00
exit.c sched: Remove SCHED_EXIT_KILL_CHILDREN option 2020-06-15 07:17:43 -06:00
spawn.h Check return from nxsem_wait_initialize() 2020-03-29 20:11:10 +01:00
task.h sched: Consolidate the cancellation notification logic 2020-06-15 21:21:14 +01:00
task_activate.c sched: Change the return type of nxtask_activate to void 2020-06-04 22:20:45 +01:00
task_atexit.c sched/task: Avoid the cast in atexit when CONFIG_SCHED_ONEXIT is defined 2020-06-05 13:29:22 +01:00
task_cancelpt.c sched: Consolidate the cancellation notification logic 2020-06-15 21:21:14 +01:00
task_create.c sched: Change tcb_s to task_tcb_s for nxtask_[un]init 2020-06-30 10:54:42 -06:00
task_delete.c sched: Consolidate the cancellation notification logic 2020-06-15 21:21:14 +01:00
task_execv.c task_execv.c:Fix style errors. 2020-03-08 07:28:04 -06:00
task_exit.c sched: task: Fix nxtask_exit() for SMP 2020-11-09 10:59:20 +01:00
task_exithook.c sched: Fix nx_waitid(), nx_waitpid(), nxtask_exithook() for SMP 2020-11-14 16:31:49 -08:00
task_getgroup.c include/nuttx/sched.h: Make naming of all internal names consistent: 2020-05-09 14:19:08 -03:00
task_getpid.c Some cosmetic updates, mostly to spacing and comments. 2018-12-30 11:58:19 -06:00
task_init.c Revert "sched: Call up_[use|create]_stack after nxtask_setup_scheduler" 2020-10-22 18:31:31 +09:00
task_onexit.c sched/task: Simplify atexit and onexit implementation 2020-06-05 13:29:22 +01:00
task_posixspawn.c include/nuttx/sched.h: Make naming of all internal names consistent: 2020-05-09 14:19:08 -03:00
task_prctl.c syscall/prctl: fix PR_SET_NAME failure if without <pid> arg 2020-07-01 21:52:18 -05:00
task_recover.c sched/sched/sched.h: Make naming of all internal names consistent: 2020-05-09 16:58:42 -03:00
task_reparent.c sched/: Make more naming consistent 2020-05-16 13:39:03 -03:00
task_restart.c sched/group: Change group_kill_children's argument from task_tcb_s to tcb_s 2020-06-15 07:09:51 -06:00
task_setcancelstate.c sched: Don't call nxnotify_cancellation in task_setcancelstate 2020-06-15 21:21:14 +01:00
task_setcanceltype.c Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
task_setup.c Make task_init() and task_activate() internal OS functions. 2020-05-25 23:54:45 +01:00
task_spawn.c sched/task/task_spawn.c: Fix duplicate task_spawn() 2020-06-01 16:40:06 +01:00
task_spawnparms.c sched: use nx_close instead of close 2020-10-28 09:11:50 -07:00
task_start.c sched: nxtask_start should call entry point directly for kernel thread 2020-10-08 09:14:33 +02:00
task_starthook.c task_starthook.c:Fix style errors. 2020-03-08 07:28:04 -06:00
task_terminate.c sched/task: do not migrate the task state to INVALID 2020-10-28 11:15:22 -07:00
task_testcancel.c Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
task_vfork.c sched: Change the return type of nxtask_activate to void 2020-06-04 22:20:45 +01:00