1、flag.c中:
void OS_FlagTaskRdy (OS_TCB *p_tcb,
OS_FLAGS flags_rdy,
CPU_TS ts)
{
p_tcb->FlagsRdy = flags_rdy;
p_tcb->PendStatus= OS_STATUS_PEND_OK; p_tcb->PendOn = OS_TASK_PEND_ON_NOTHING;
p_tcb->TS = ts;
switch (p_tcb->TaskState) {
case OS_TASK_STATE_RDY:
case OS_TASK_STATE_DLY:
case OS_TASK_STATE_DLY_SUSPENDED:
case OS_TASK_STATE_SUSPENDED:
break;
case OS_TASK_STATE_PEND:
case OS_TASK_STATE_PEND_TIMEOUT:
OS_TaskRdy(p_tcb);
p_tcb->TaskState = OS_TASK_STATE_RDY;
break;
case OS_TASK_STATE_PEND_SUSPENDED:
case OS_TASK_STATE_PEND_TIMEOUT_SUSPENDED:
p_tcb->TaskState =OS_TASK_STATE_SUSPENDED; //这里应该有 //OS_TickListRemove(p_tcb); |