UINT32 LOS_TaskSuspend ( UINT32  uwTaskID  ) 

Suspend a task.

Description:
This API is used to suspend a specified task, and the task will be removed from the queue of ready tasks.
注意:
  • The task that is running and locked cannot be suspended.
  • The idle task and swtmr task cannot be suspended.
参数:
参数名称 描述
uwTaskID  [IN] Type UINT32 Task ID. The task id value is obtained from task creation.
返回值:
返回值 描述
LOS_ERRNO_TSK_OPERATE_IDLE  Check the task ID and do not operate on the idle task.
LOS_ERRNO_TSK_SUSPEND_SWTMR_NOT_ALLOWED  Check the task ID and do not operate on the swtmr task.
LOS_ERRNO_TSK_ID_INVALID  Invalid Task ID
LOS_ERRNO_TSK_NOT_CREATED  The task is not created.
LOS_ERRNO_TSK_ALREADY_SUSPENDED  The task is already suspended.
LOS_ERRNO_TSK_SUSPEND_LOCKED  The task being suspended is current task and task scheduling is locked.
LOS_OK  The task is successfully suspended.
Dependency:
  • los_task.h: the header file that contains the API declaration.
参见:
LOS_TaskResume
自从:
Huawei LiteOS V100R001C00