mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 05:53:49 +01:00
As the comment above cpu_switch_context_exit notes: sched_active_thread is not valid when cpu_switch_context_exit() is called. Unfortunately, thread_yield(), which is called directly by cpu_switch_context_exit(), uses sched_active_thread possibly resulting in a null pointer dereference. Solution: Trigger a software interrupt to perform a context switch and let sched_run() determine the next valid thread from there.