TI-RTOS的PRIORITY问题
时间:12-23
整理:3721RD
点击:
TI-RTOS操作系统中的优先级(PRIORITY)是如何Set或使用的?
抢占式还是时间片。
谢谢!
抢占式。
The TI-RTOS Kernel (SYS/BIOS) is a PRE-EMPTIVE scheduler. This means the
highest priority thread ALWAYS RUNS FIRST. Time-slicing is not inherently
supported (can change PRI dynamically if desired).
任务优先级的设置可以参考BLE-STACK里的任务创建
void SimpleBLEPeripheral_createTask(void)
{
Task_Params taskParams;
// Configure task
Task_Params_init(&taskParams);
taskParams.stack = sbpTaskStack;
taskParams.stackSize = SBP_TASK_STACK_SIZE;
taskParams.priority = SBP_TASK_PRIORITY;
Task_construct(&sbpTask, SimpleBLEPeripheral_taskFxn, &taskParams, NULL);
}