1 任务切换
2 任务切换代码分析
taskInit 对任务进行初始化
#if ((CPU_FAMILY == ARM) && ARM_THUMB)
pTcb->entry = (FUNCPTR)((UINT32)entryPt & ~1); /* entry address */
#else
pTcb->entry = entryPt; /* entry address */
#endif
3 初始化函数入口的寄存器
.balign 16,0x90
FUNC_LABEL(vxTaskEntry)
xorl %ebp,%ebp /* make sure frame pointer is 0 */
movl FUNC(taskIdCurrent),%eax /* get current task id */
movl WIND_TCB_ENTRY(%eax),%eax /* entry point for task is in tcb */
call *%eax /* call main routine */
addl $40,%esp /* pop args to main routine */
pushl %eax /* pass result to exit */
call FUNC(exit) /* gone for good */
取出 FUNCPTR enrtry
#define WIND_TCB_ENTRY (0x70+WIND_OBJ_CORE_SIZE) /* 0xb0 */
call *%eax // 调用任务体
完成了任务调用