????д???????????????
???????????? ???????[ 2013/8/14 11:30:19 ] ????????
??????????ж??????????? OSIntExit(); //?????????л????ж?
??????????????У??????????????????????????????????????????????л????
????????????????????OSTimeDly (int32 ticks)
void OSTimeDly (int32 ticks)
{
OS_CPU_SR cpu_sr = 0;
int8 index;
TCB *pTCB;
OS_ENTER_CRITICAL();
OSCurTCB->TCBDelay = ticks;
OSNewTCB = NULL;
/*?????????????????????????
???????????????????????????
?????????????????*/
for (index = 0; index < TaskNUM;index++)
{
pTCB = OSTCBTable+index;
/*???????????*/
if (pTCB->TCBDelay != 0)
{
continue;
}
/*????????????*/
if (pTCB->TaskStat == OS_Task_Pend)
{
continue;
}
/*?????????????????
??????????????????*/
if (OSCurTCB->CurPriority < pTCB->CurPriority)
{
OSNewTCB = pTCB;
break;
}
/*????????????????????*/
if (OSCurTCB->CurPriority > pTCB->CurPriority)
{
/*????????????????????????????
?????????????????*/
if (OSNewTCB == NULL)
{
OSNewTCB = pTCB;
}
break;
}
/*?????????????????
????????????????????*/
if (OSCurTCB->CurPriority == pTCB->CurPriority)
{
/*?????????????????*/
if ((pTCB > OSCurTCB))
{
OSNewTCB = pTCB;
break ;
}
/*??????????????????????
?????????????????????????????????*/
if (((pTCB < OSCurTCB)||(pTCB == OSCurTCB))
&&(OSNewTCB == NULL))
{
OSNewTCB = pTCB;
continue;
}
}
}
OS_EXIT_CRITICAL();
OSTaskSche();
}
????????????????????????????????????????????????е????????????????????????????????????????л????????????????????л?????????????????????????Ч???????????????????????????????????β???????????顣?????????????????????????и??????????????????????Ч??????????????????
?????????????????????????л????????????????????ν??????????...
??????CSDN????п??????????????KEILMDK4.23??IDE
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11