VOID LOS_Msleep ( UINT32  uwMsecs  ) 

Sleep the current task.

Description:
This API is used to delay the execution of the current task. The task is able to be scheduled after it is delayed for a specified number of Ticks.
注意:
  • The task fails to be delayed if it is being delayed during interrupt processing or it is locked.
  • If 0 is passed in and the task scheduling is not locked, execute the next task in the queue of tasks with the priority of the current task. If no ready task with the priority of the current task is available, the task scheduling will not occur, and the current task continues to be executed.
  • The parameter passed in can not be equal to LOS_WAIT_FOREVER(0xFFFFFFFF). If that happens, the task will not sleep 0xFFFFFFFF milliseconds or sleep forever but sleep 0xFFFFFFFF Ticks.
参数:
参数名称 描述
uwMsecs  [IN] Type UINT32 Number of MS for which the task is delayed.
返回值:
返回值 描述
None 
Dependency:
  • los_base.h: the header file that contains the API declaration.
参见:
None
自从:
Huawei LiteOS V100R001C00