nuttx/sched
ligd e2df52390a SMP: fix crash when switch to new task which is still running
Situation:

Assume we have 2 cpus, and busy run task0.

CPU0                                CPU1
task0 -> task1                      task2 -> task0
1. remove task0 form runninglist
2. take task1 as new tcb
3. add task0 to blocklist
4. clear spinlock
                                    4.1 remove task2 form runninglist
                                    4.2 take task0 as new tcb
                                    4.3 add task2 to blocklist
                                    4.4 use svc ISR swith to task0
                                    4.5 crash
5. use svc ISR swith to task1

Fix:
Move clear spinlock to the end of svc ISR

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-17 17:37:47 +09:00
..
clock sched: Remove the unnecessary weak_function 2022-08-30 09:42:24 +02:00
environ sched: fix visual studio Compiler Warning (level 4) C4706 2022-08-17 18:33:44 +08:00
group sched: Remove the unnecessary weak_function 2022-08-30 09:42:24 +02:00
init sched: Remove volatile from the task list 2022-08-31 08:50:57 +09:00
irq SMP: fix crash when switch to new task which is still running 2022-09-17 17:37:47 +09:00
module mod_insmod: fix coverity warning 2022-04-02 20:09:42 +08:00
mqueue sched/mqueue: fix resource leak in mq_timedsend() 2022-09-15 01:56:35 +08:00
paging sched: Remove the unnecessary "FAR dq_queue_t *" cast 2022-08-31 08:50:57 +09:00
pthread pthread: fix typo with CONFIG_PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT 2022-09-05 15:36:23 +02:00
sched SMP: fix crash when switch to new task which is still running 2022-09-17 17:37:47 +09:00
semaphore sched/semaphore: add sem_count temporary variable to improve performance 2022-08-31 20:34:30 +08:00
signal sched: fix corner case wd_cancel assert crash 2022-09-07 10:50:28 +08:00
task sched: Remove the unnecessary "FAR dq_queue_t *" cast 2022-08-31 08:50:57 +09:00
timer sched: Remove the unnecessary weak_function 2022-08-30 09:42:24 +02:00
tls Fix typos 2022-08-07 23:33:19 +08:00
wdog sched/wdog: Change the return type of wd_gettime from int to sclock_t 2022-05-19 23:21:54 +03:00
wqueue wqueue: fix race-condition on work_queue 2022-09-09 21:52:21 +02:00
Kconfig sched: Simplify the cpuload process 2022-08-18 22:11:29 +03:00
Makefile sched/tls: Add tls_init_info and tls_dup_info 2022-06-03 23:56:50 +03:00