nuttx/sched
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
..
clock clock/time: add CLOCK_BOOTTIME definition 2020-12-10 06:40:47 -06:00
environ global change: repace sched_xfree() to kxmm_free() 2020-04-09 10:29:28 -06:00
group Modify SIGSTP to SIGTSTP 2020-10-29 01:12:43 -07:00
init sched/init: init the default home directory to environment 2020-11-09 23:42:46 -08:00
irq sched: irq: Change irq_waitlock() from private to public 2020-12-10 08:33:42 +01:00
module sched/module/mod_modhandle.c: Fix a syslog format 2020-11-21 19:38:32 -08:00
mqueue sched/mqueue: Make the pre-allocated irq messages configurable 2020-12-20 19:31:59 +01:00
paging Rename clock_systime[r|spec] to clock_systime_[ticks|timespec] 2020-05-10 14:35:50 -06:00
pthread sched: pthread: Fix potential bugs in pthread_condclockwait.c 2020-12-14 21:11:05 -06:00
sched arch, sched: Fix global IRQ control logics for SMP 2020-12-10 08:33:42 +01:00
semaphore spinlock: Introduce SP_WFE() and SP_SEV() 2020-12-11 05:58:35 -06:00
signal sched/signal: Make the pre-allocated irq actions configurable 2020-12-20 19:31:59 +01:00
task arch & sched: task: Fix up_exit() and nxtask_exit() for SMP 2020-12-21 23:29:56 -06:00
timer clock/time: add CLOCK_BOOTTIME definition 2020-12-10 06:40:47 -06:00
wdog sched/wdog: Remove MAX_WDOGPARMS and related stuff 2020-08-14 08:19:50 -06:00
wqueue sched/: Make more naming consistent 2020-05-16 13:39:03 -03:00
Kconfig sched/Kconfig: Minor grammar fixes in help text 2020-12-21 20:04:45 -06:00
Makefile style/Makefile: remove unnecessary trailing whitespace 2020-11-28 12:20:30 +01:00