nuttx/sched/task
Masayuki Ishikawa ec73a4e69c arch & sched: task: Fix up_exit() and nxtask_exit() for SMP
Summary:
- During repeating ostest with sabre-6quad:smp (QEMU),
  I noticed that pthread_rwlock_test sometimes stops
- Finally, I found that nxtask_exit() released a critical
  section too early before context switching which resulted in
  selecting inappropriate TCB
- This commit fixes this issue by moving nxsched_resume_scheduler()
  from nxtask_exit() to up_exit() and also removing
  spin_setbit() and spin_clrbit() from nxtask_exit()
  because the caller holds a critical section
- To be consistent with non-SMP cases, the above changes
  were done for all CPU architectures

Impact:
- This commit affects all CPU architectures regardless of SMP

Testing:
- Tested with ostest with the following configs
- sabre-6quad:smp (QEMU, dev board), sabre-6quad:nsh (QEMU)
- spresense:wifi_smp
- sim:smp, sim:ostest
- maix-bit:smp (QEMU)
- esp32-devkitc:smp (QEMU)
- lc823450-xgevk:rndis

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-21 23:29:56 -06:00
..
exit.c
Make.defs libc: Implement getppid 2020-12-20 16:40:14 -03:00
spawn.h
task_activate.c
task_atexit.c
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_exit.c arch & sched: task: Fix up_exit() and nxtask_exit() for SMP 2020-12-21 23:29:56 -06: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
task_getpid.c
task_getppid.c libc: Implement getppid 2020-12-20 16:40:14 -03: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
task_posixspawn.c
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
task_reparent.c
task_restart.c
task_setcancelstate.c sched: Don't call nxnotify_cancellation in task_setcancelstate 2020-06-15 21:21:14 +01:00
task_setcanceltype.c
task_setup.c
task_spawn.c
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_terminate.c sched/task: do not migrate the task state to INVALID 2020-10-28 11:15:22 -07:00
task_testcancel.c
task_vfork.c
task.h sched: Consolidate the cancellation notification logic 2020-06-15 21:21:14 +01:00