UINT32 LOS_TaskYield ( VOID   ) 

Change the scheduling sequence of tasks with the same priority.

Description:
This API is used to move current task in a queue of tasks with the same priority to the tail of the queue of ready tasks.
注意:
  • At least two ready tasks need to be included in the queue of ready tasks with the same priority. If the less than two ready tasks are included in the queue, an error is reported.
参数:
参数名称 描述
None. 
返回值:
返回值 描述
LOS_ERRNO_TSK_ID_INVALID  Invalid Task ID
LOS_ERRNO_TSK_YIELD_NOT_ENOUGH_TASK  No tasks with the same priority is available for scheduling.
LOS_OK  The scheduling sequence of tasks with same priority is successfully changed.
Dependency:
  • los_task.h: the header file that contains the API declaration.
参见:
自从:
Huawei LiteOS V100R001C00