void OSIntExit (void) { OS_ENTER_CRITICAL(); if ((--OSIntNesting | OSLockNesting) == 0) { /* Reschedule only if all ISRs completed & not locked */ OSIntExitY = OSUnMapTbl[OSRdyGrp]; OSPrioHighRdy = (INT8U)((OSIntExitY << 3) + OSUnMapTbl[OSRdyTbl][OSIntExitY]]); if (OSPrioHighRdy != OSPrioCur) { /* No context switch if current task is highest ready */ OSTCBHighRdy = OSTCBPrioTbl[OSPrioHighRdy]; OSCtxSwCtr++; /* Keep track of the number of context switches */ OSIntCtxSw(); /* Perform interrupt level context switch */ } } OS_EXIT_CRITICAL(); } 在上述程序里假如 OSIntCtxSw();里进行了任务调度那么 OS_EXIT_CRITICAL(); 这个函数什么时候执行 该中断应该怎么退出? 那位大侠指导、指导。 |