AliOS-Things icon indicating copy to clipboard operation
AliOS-Things copied to clipboard

alios的任务切换如何实现的?能大概给出一个基本的流程吗?

Open supeng6751 opened this issue 8 years ago • 1 comments

supeng6751 avatar Feb 09 '18 06:02 supeng6751

是指rhino内核的任务切换吗?

如果是的话,请查阅cpu_task_switch()相关代码,在kernel/rhino/core/k_sched.c的core_sched()中会调用到,其实现因不同的芯片架构而异,比如:

platform/arch/xtensa/lx106/port.c: void cpu_task_switch()
platform/arch/arm/armv7m/gcc/m4/port_s.S: cpu_task_switch

等等

librae8226 avatar Feb 24 '18 04:02 librae8226