12 /* RTOS ports that support interrupt nesting have the concept of a maximum 13 system call (or maximum API call) interrupt priority. Interrupts that are 14 above the maximum system call priority are kept permanently enabled, even 15 when the RTOS kernel is in a critical section, but canno...
这里尤其注意第2个if语句,如果创建的新任务优先级更高,那么就立即执行它: #define portYIELD() __asm ( "SWI 0" ) #ifndef portYIELD_WITHIN_API#define portYIELD_WITHIN_API portYIELD #endif #if ( configUSE_PREEMPTION == 0 ) /* If the cooperative scheduler is being used then a yield should not...