This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

有关sysbios中的Task_yield() 和 Task_sleep()

大家好 问一下

我的程序中有好几个task 优先级一致 之间的调度一开始用的是Task_sleep() 运行正常

把每个任务的Task_sleep() 替换换为Task_yield() 运行貌似也正常

这两种方式有什么区别 那种好一些???

Void UartWriteBuff(UArg a0, UArg a1)
{
for(;;)
{

mcbsp_send_uart(1,McBSP0_Send_UART,14);

Task_sleep(10);//休眠ms
//Task_yield();
}
}

Void UartWriteBuff(UArg a0, UArg a1)
{
for(;;)
{

mcbsp_send_uart(1,McBSP0_Send_UART,14);

//Task_sleep(10);//休眠ms
Task_yield();
}
}