求助,懂ucos-ii系统的大神帮帮忙啊。。。。

[复制链接]
 楼主| aukey 发表于 2012-7-24 17:08 | 显示全部楼层 |阅读模式
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(); 这个函数什么时候执行  
该中断应该怎么退出?
那位大侠指导、指导。
airwill 发表于 2012-7-25 19:50 | 显示全部楼层
OSIntCtxSw();里有没有进行了任务调度对后面的执行没有关系, 只是中断返回到哪里去执行不同而已
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

20

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部