【FreeRTOS】任务调度
作者:互联网
上下文切换接口
/**
* task. h
*
* Macro for forcing a context switch.
*
* \defgroup taskYIELD taskYIELD
* \ingroup SchedulerControl
*/
#define taskYIELD() portYIELD()
cortex-m4f架构上的实现
// FreeRTOS\Source\portable\IAR\ARM_CM4F\portmacro.h
#define portYIELD() \
{ \
/* Set a PendSV to request a context switch. */ \
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; \
__DSB(); \
__ISB(); \
}
标签:__,portYIELD,FreeRTOS,portNVIC,taskYIELD,任务调度,define 来源: https://www.cnblogs.com/skullboyer/p/16195300.html