incubator-nuttx/sched/irq
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
..
Make.defs sched: Author Gregory Nutt: update licenses to Apache 2021-02-09 01:21:53 -08:00
irq.h sched: Remove the unnecessary weak_function 2022-08-30 09:42:24 +02:00
irq_attach.c sched: Author Gregory Nutt: update licenses to Apache 2021-02-09 01:21:53 -08:00
irq_chain.c Include assert.h in necessary place 2021-06-08 13:06:08 -07:00
irq_csection.c SMP: fix crash when switch to new task which is still running 2022-09-17 17:37:47 +09:00
irq_dispatch.c sched: fix kasan report error when open CONFIG_DEBUG_MM 2022-09-09 19:00:05 +02:00
irq_foreach.c sched: Author Gregory Nutt: update licenses to Apache 2021-02-09 01:21:53 -08:00
irq_initialize.c sched/irq: Remove the code which zero out g_irqvector fields 2022-03-12 15:06:39 -03:00
irq_procfs.c irq_procfs: fix divide 0 error 2022-07-22 10:53:44 +08:00
irq_spinlock.c sched/*/*spinlock.c: Fix some typos. 2021-07-24 09:00:41 -07:00
irq_unexpectedisr.c Fix compiler warnings (-Wunused-parameter) in various functions 2022-07-12 11:42:34 +08:00