|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|

结构体 | |
| struct | tagTskInitParam |
| struct | tagTskInfo |
类型定义 | |
| typedef void *(* | TSK_ENTRY_FUNC) (void *param) |
| Define the type of a task entrance function. | |
| typedef struct tagTskInitParam | TSK_INIT_PARAM_S |
| typedef struct tagTskInfo | TSK_INFO_S |
| typedef void(* | LOWPOWERIDLEHOOK) (void) |
| Define the lowpower framework process function type. | |
| typedef void(* | IDLEHANDLERHOOK) (void) |
| Define the type of idle handler hook function. | |
枚举 | |
| enum | TaskAttrBits { LOS_TASK_OS_ALLOC_SECURE = 1 << 0 , LOS_TASK_STATUS_JOINABLE = 1 << 7 , LOS_TASK_STATUS_DETACHED = 1 << 8 } |
函数 | |
| UINT32 | LOS_TaskResume (UINT32 taskId) |
| Resume a task. | |
| UINT32 | LOS_TaskSuspend (UINT32 taskId) |
| Suspend a task. | |
| UINT32 | LOS_TaskDelete (UINT32 taskId) |
| Delete a task. | |
| UINT32 | LOS_TaskDelay (UINT32 tick) |
| Delay a task. | |
| BOOL | LOS_TaskIsScheduled (void) |
| To check if the current running core is scheduled. | |
| void | LOS_TaskLock (void) |
| Lock the task scheduling. | |
| void | LOS_TaskUnlock (void) |
| Unlock the task scheduling. | |
| void | LOS_TaskUnlockNoSched (void) |
| Unlock the task scheduling and no scheduling is generated. | |
| UINT32 | LOS_TaskPriSet (UINT32 taskId, UINT16 taskPrio) |
| Set a task priority. | |
| UINT32 | LOS_CurTaskPriSet (UINT16 taskPrio) |
| Set the priority of the current running task to a specified priority. | |
| UINT32 | LOS_TaskYield (void) |
| Change the scheduling sequence of tasks with the same priority. | |
| UINT16 | LOS_TaskPriGet (UINT32 taskId) |
| Obtain a task priority. | |
| UINT32 | LOS_CurTaskIDGet (void) |
| Obtain current running task ID. | |
| UINT32 | LOS_TaskInfoGet (UINT32 taskId, TSK_INFO_S *taskInfo) |
| Obtain a task information structure. | |
| UINT32 | LOS_TaskCpuAffiSet (UINT32 taskId, UINT16 usCpuAffiMask) |
| Set the affinity mask of the task scheduling cpu. | |
| UINT16 | LOS_TaskCpuAffiGet (UINT32 taskId) |
| Get the affinity mask of the task scheduling cpu. | |
| void | LOS_TaskResRecycle (void) |
| Recycle task stack resource. | |
| void | LOS_LowpowerHookReg (LOWPOWERIDLEHOOK hook) |
| Register a hook to enter lowpower framework process. | |
| void | LOS_IdleHandlerHookReg (IDLEHANDLERHOOK hook) |
| Register the hook function for idle task. | |
| UINT32 | LOS_TaskDetach (UINT32 taskId) |
| Modify the task attributes to detach. | |
| UINT32 | LOS_TaskJoin (UINT32 taskId, UINTPTR *retval) |
| Join with a terminated thread. | |
| #define LOS_ERRNO_TSK_ACTIVE_FAILED LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x19) |
Task error code: The task fails to be activated.
Value: 0x03000219.
Solution: Perform task switching after creating an idle task.
| #define LOS_ERRNO_TSK_ALLOC_SECURE_FAILED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x29) |
Task error code: Failed to apply for the security task stack.
Value: 0x02000229.
Solution: Check the usage scenario and the size of the secure memory pool.
| #define LOS_ERRNO_TSK_ALLOC_SECURE_INT LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x27) |
Task error code: Apply for the security task stack in interrupt.
Value: 0x02000227.
Solution: Don't apply for the security task stack in interrupt.
| #define LOS_ERRNO_TSK_ALREADY_JOIN LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2d) |
Task error code: A task cannot be waiting for multiple tasks.
Value: 0x0200022d.
Solution: Check whether other tasks are waiting for this task.
| #define LOS_ERRNO_TSK_ALREADY_SUSPENDED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x08) |
Task error code: The task is already suspended.
Value: 0x02000208.
Solution: Suspend the task after it is resumed.
| #define LOS_ERRNO_TSK_CONFIG_TOO_MANY LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1a) |
Task error code: Too many task configuration items.
Value: 0x0200021a
Solution: This error code is not in use temporarily.
| #define LOS_ERRNO_TSK_CP_SAVE_AREA_NOT_ALIGN LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1b) |
Task error code: This error code is not in use temporarily.
Value: 0x0200021b
| #define LOS_ERRNO_TSK_CP_SAVE_AREA_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1e) |
Task error code: This error code is not in use temporarily.
Value: 0x0200021e
| #define LOS_ERRNO_TSK_CPU_AFFINITY_MASK_ERR LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x23) |
Task error code: The cpu affinity mask is incorrect.
Value: 0x03000223.
Solution: Please set the correct cpu affinity mask.
| #define LOS_ERRNO_TSK_DELAY_IN_INT LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x0d) |
Task error code: The task delay occurs during an interrupt.
Value: 0x0300020d.
Solution: Perform this operation after exiting from the interrupt.
| #define LOS_ERRNO_TSK_DELAY_IN_LOCK LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x0e) |
Task error code: The task delay occurs when the task is locked.
Value: 0x0200020e.
Solution: Perform this operation after unlocking the task.
| #define LOS_ERRNO_TSK_DELETE_LOCKED LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x0b) |
Task error code: The task is locked when it is being deleted.
Value: 0x0300020b.
Solution: Unlock the task.
| #define LOS_ERRNO_TSK_ENTRY_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x04) |
Task error code: The task entrance is NULL.
Value: 0x02000204.
Solution: Define the task entrance function.
| #define LOS_ERRNO_TSK_FREE_SECURE_FAILED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2a) |
Task error code: Failed to free the security task stack.
Value: 0x0200022a.
Solution: Check the usage scenario and parameter.
| #define LOS_ERRNO_TSK_FREE_STACK_FAILED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x17) |
Task error code: The task stack fails to be freed.
Value: 0x02000217
Solution: This error code is not in use temporarily.
| #define LOS_ERRNO_TSK_HOOK_IS_FULL LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x13) |
Task error code: The number of task hook functions exceeds the permitted upper limit.
Value: 0x02000213.
Solution: This error code is not in use temporarily.
| #define LOS_ERRNO_TSK_HOOK_NOT_MATCH LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x12) |
Task error code: The task hook function is not matchable.
Value: 0x02000212.
Solution: This error code is not in use temporarily.
| #define LOS_ERRNO_TSK_ID_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x07) |
Task error code: Invalid task ID.
Value: 0x02000207.
Solution: Check the task ID.
| #define LOS_ERRNO_TSK_IS_DETACHED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2e) |
Task error code: This task is detached attr.
Value: 0x0200022e.
Solution: Check the task properties and whether it is waiting for other tasks to finish.
| #define LOS_ERRNO_TSK_IS_ZOMBIE LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x30) |
Task error code: An "zombie" task cannot be operated.
Value: 0x02000230.
Solution: Check whether a Joinable task exists. If so, call LOS_TaskJoin to reclaim resources.
| #define LOS_ERRNO_TSK_MP_SYNC_FAILED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x26) |
Task error code: Task sync failed on operating running task across cores.
Value: 0x02000226.
Solution: Check task delete can be handled in user's scenario.
| #define LOS_ERRNO_TSK_MP_SYNC_RESOURCE LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x25) |
Task error code: Task sync resource (semaphore) allocated failed.
Value: 0x02000225.
Solution: Expand LOSCFG_BASE_IPC_SEM_LIMIT.
| #define LOS_ERRNO_TSK_MSG_NONZERO LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x0c) |
Task error code: The task message is nonzero.
Value: 0x0200020c.
Solution: This error code is not in use temporarily.
| #define LOS_ERRNO_TSK_MSG_Q_TOO_MANY LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1d) |
Task error code: This error code is not in use temporarily.
Value: 0x0200021d
| #define LOS_ERRNO_TSK_NAME_EMPTY LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x05) |
Task error code: The task name is NULL.
Value: 0x02000205.
Solution: Set the task name.
| #define LOS_ERRNO_TSK_NO_MEMORY LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x00) |
Task error code: Insufficient memory for task creation.
Value: 0x03000200.
Solution: Allocate bigger memory partition to task creation.
| #define LOS_ERRNO_TSK_NOT_ALLOW_IN_INT LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2b) |
Task error code: This task operation is not allowed to be performed in an interrupt.
Value: 0x0200022b.
Solution: Check whether the interface is used in interrupts.
| #define LOS_ERRNO_TSK_NOT_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x0a) |
Task error code: The task is not created.
Value: 0x0200020a.
Solution: Create the task.
| #define LOS_ERRNO_TSK_NOT_JOIN_SELF LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2f) |
Task error code: Tasks can't join himself.
Value: 0x0200022f.
Solution: Check whether the task ID is the current running task.
| #define LOS_ERRNO_TSK_NOT_SUSPENDED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x09) |
Task error code: The task is not suspended.
Value: 0x02000209.
Solution: Suspend the task.
| #define LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x14) |
Task error code: The operation is performed on the system-level task. old usage: The operation is performed on the idle task (LOS_ERRNO_TSK_OPERATE_IDLE)
Value: 0x02000214.
Solution: Check the task ID and do not operate the system-level task.
| #define LOS_ERRNO_TSK_PRIOR_ERROR LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x03) |
Task error code: Incorrect task priority.
Value: 0x02000203.
Solution: Re-configure the task priority by referring to the priority range.
| #define LOS_ERRNO_TSK_PTR_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x01) |
Task error code: Null parameter.
Value: 0x02000201.
Solution: Check the parameter.
| #define LOS_ERRNO_TSK_SCHED_LOCKED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2c) |
Task error code: Locked scheduling does not allow tasks to be blocked.
Value: 0x0200022c.
Solution: Check for faulty lock scheduling logic.
| #define LOS_ERRNO_TSK_SECURE_ALREADY_ALLOC LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x28) |
Task error code: The security task stack is already allocated.
Value: 0x02000228.
Solution: Don't reapply.
| #define LOS_ERRNO_TSK_SELF_DELETE_ERR LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1f) |
Task error code: This error code is not in use temporarily.
Value: 0x0200021f
| #define LOS_ERRNO_TSK_STKAREA_TOO_SMALL LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x18) |
Task error code: The task stack area is too small.
Value: 0x02000218
Solution: This error code is not in use temporarily.
| #define LOS_ERRNO_TSK_STKSZ_NOT_ALIGN LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x02) |
Task error code: The task stack is not aligned.
Value: 0x02000202.
Solution: Align the task stack.
| #define LOS_ERRNO_TSK_STKSZ_TOO_LARGE LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x20) |
Task error code: The task stack size is too large.
Value: 0x02000220.
Solution: shrink the task stack size parameter.
| #define LOS_ERRNO_TSK_STKSZ_TOO_SMALL LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x06) |
Task error code: The task stack size is too small.
Value: 0x02000206.
Solution: Expand the task stack.
| #define LOS_ERRNO_TSK_SUSPEND_LOCKED LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x15) |
Task error code: The task that is being suspended is locked.
Value: 0x03000215.
Solution: Suspend the task after unlocking the task.
| #define LOS_ERRNO_TSK_SUSPEND_SWTMR_NOT_ALLOWED LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x21) |
Task error code: Suspending software timer task is not allowed.
Value: 0x02000221.
Solution: Check the task ID and do not suspend software timer task.
| #define LOS_ERRNO_TSK_TCB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x11) |
Task error code: No free task control block is available.
Value: 0x02000211.
Solution: Increase the number of task control blocks.
| #define LOS_ERRNO_TSK_YIELD_IN_INT LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x24) |
Task error code: Task yield in interrupt is not permited, which will result in an unexpected result.
Value: 0x02000224.
Solution: Don't call LOS_TaskYield in Interrupt.
| #define LOS_ERRNO_TSK_YIELD_IN_LOCK LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x0f) |
Task error code: The task yield occurs when the task is locked.
Value: 0x0200020f.
Solution: Check the task.
| #define LOS_ERRNO_TSK_YIELD_NOT_ENOUGH_TASK LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x10) |
Task error code: Only one task or no task is available for scheduling.
Value: 0x02000210.
Solution: Increase the number of tasks.
| #define LOS_TASK_MIN_STACK_SIZE (LOS_Align(KERNEL_TSK_MIN_STACK_SIZE, LOSCFG_STACK_POINT_ALIGN_SIZE)) |
Minimum stack size.
LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE bytes, configured in menuconfig. LOS_TASK_MIN_STACK_SIZE bytes, aligned on a boundary of LOSCFG_STACK_POINT_ALIGN_SIZE.
| #define LOS_TASK_NAMELEN 32 |
Task name length
| #define LOS_TASK_PRIORITY_HIGHEST 0 |
Highest task priority
| #define LOS_TASK_PRIORITY_LOWEST 31 |
Lowest task priority
| typedef void(* IDLEHANDLERHOOK) (void) |
Define the type of idle handler hook function.
| None. |
| None. |
| typedef void(* LOWPOWERIDLEHOOK) (void) |
Define the lowpower framework process function type.
| None. |
| None. |
| typedef void *(* TSK_ENTRY_FUNC) (void *param) |
Define the type of a task entrance function.
| param1 | [IN] Type UINTPTR The first parameter passed to the task handling function. |
| param2 | [IN] Type UINTPTR The second parameter passed to the task handling function. |
| param3 | [IN] Type UINTPTR The third parameter passed to the task handling function. |
| param4 | [IN] Type UINTPTR The fourth parameter passed to the task handling function. |
| None. |
| typedef struct tagTskInfo TSK_INFO_S |
Task information structure.
| typedef struct tagTskInitParam TSK_INIT_PARAM_S |
Define the structure of the parameters used for task creation.
Information of specified parameters passed in during task creation.
| enum TaskAttrBits |
Set the bits of task parameters during task creation.
|
extern |
Obtain current running task ID.
| LOS_ERRNO_TSK_ID_INVALID | Can not get current running task. |
| UINT32 | Task ID. |
Set the priority of the current running task to a specified priority.
| taskPrio | [IN] Type UINT16 Task priority. |
| LOS_ERRNO_TSK_PRIOR_ERROR | Incorrect task priority.Re-configure the task priority. |
| LOS_ERRNO_TSK_ID_INVALID | The current task ID is invalid. |
| LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK | The current task is a system-level task, like idle or swtmr task. This is not allowed. |
| LOS_ERRNO_TSK_NOT_CREATED | The task is not created. |
| LOS_OK | The priority of the current running task is successfully set to a specified priority. |
|
extern |
Register the hook function for idle task.
| None. |
| None. |
|
extern |
Register a hook to enter lowpower framework process.
| hook | [IN] The lowpower framework hook. |
| None. |
Get the affinity mask of the task scheduling cpu.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| 0 | Fail to obtain the cpu affinity mask. |
| UINT16 | The scheduling cpu mask. The low to high bit of the mask corresponds to the cpu number. |
Set the affinity mask of the task scheduling cpu.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| usCpuAffiMask | [IN] Type UINT16 The scheduling cpu mask.The low to high bit of the mask corresponds to the cpu number, the high bit that exceeding the CPU number is ignored. |
| LOS_ERRNO_TSK_ID_INVALID | Invalid task ID. |
| LOS_ERRNO_TSK_NOT_CREATED | The task is not created. |
| LOS_ERRNO_TSK_CPU_AFFINITY_MASK_ERR | The task cpu affinity mask is incorrect. |
| LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK | The task is system task. |
| LOS_ERRNO_TSK_IS_ZOMBIE | The task is in a "zombie" state. |
| LOS_OK | The task cpu affinity mask is successfully set. |
Delay a task.
| tick | [IN] Type UINT32 Number of Ticks for which the task is delayed. |
| LOS_ERRNO_TSK_DELAY_IN_INT | The task delay occurs during an interrupt. |
| LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK | The current task is a system-level task, like idle or swtmr task. This is not allowed. |
| LOS_ERRNO_TSK_DELAY_IN_LOCK | The task delay occurs when the task scheduling is locked. |
| 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 task is successfully delayed. |
Delete a task.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| LOS_ERRNO_TSK_ID_INVALID | Invalid Task ID |
| LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK | Check the task ID and do not operate the system-level task, like idle or swtmr task. |
| LOS_ERRNO_TSK_NOT_CREATED | The task is not created. |
| LOS_ERRNO_TSK_DELETE_LOCKED | The task being deleted is current task and task scheduling is locked. |
| LOS_ERRNO_TSK_FREE_SECURE_FAILED | Failed to free the security task stack. |
| LOS_OK | The task is successfully deleted. |
Modify the task attributes to detach.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| LOS_ERRNO_TSK_ID_INVALID | Invalid Task ID. |
| LOS_ERRNO_TSK_NOT_ALLOW_IN_INT | Not allowed in interrupt context. |
| LOS_ERRNO_TSK_NOT_CREATED | The task is not created. |
| LOS_ERRNO_TSK_IS_DETACHED | The task is already a detach task. |
| LOS_ERRNO_TSK_ALREADY_JOIN | A task is waiting for this task. |
| LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK | This task is a system task. |
| LOS_OK | Modify the task attributes to detach is successfully. |
|
extern |
Obtain a task information structure.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| taskInfo | [OUT] Type TSK_INFO_S* Pointer to the task information structure to be obtained. |
| LOS_ERRNO_TSK_PTR_NULL | Null parameter. |
| LOS_ERRNO_TSK_ID_INVALID | Invalid task ID. |
| LOS_ERRNO_TSK_NOT_CREATED | The task is not created. |
| LOS_OK | The task information structure is successfully obtained. |
|
extern |
To check if the current running core is scheduled.
| None. |
| True | The current running core is scheduled. |
| False | The current running core is start-up, not int multi-task environment. |
Join with a terminated thread.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| retval | [IN] Value returned when the task is complete. |
| LOS_ERRNO_TSK_ID_INVALID | Invalid Task ID. |
| LOS_ERRNO_TSK_NOT_ALLOW_IN_INT | Not allowed in interrupt context. |
| LOS_ERRNO_TSK_SCHED_LOCKED | This task cannot be invoked when locked scheduled. |
| LOS_ERRNO_TSK_NOT_JOIN_SELF | Tasks can't join himself. |
| LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK | This task is a system task. |
| LOS_ERRNO_TSK_NOT_CREATED | The task is not created. |
| LOS_ERRNO_TSK_IS_DETACHED | Cannot join a detach task. |
| LOS_ERRNO_TSK_ALREADY_JOIN | A task is waiting for this task. |
| LOS_OK | Modify the task attributes to detach is successfully. |
|
extern |
Lock the task scheduling.
| None. |
| None. |
Obtain a task priority.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| OS_INVALID | Fails to obtain the task priority. |
| UINT16 | The task priority. |
Set a task priority.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| taskPrio | [IN] Type UINT16 Task priority. |
| LOS_ERRNO_TSK_PRIOR_ERROR | Incorrect task priority.Re-configure the task priority |
| LOS_ERRNO_TSK_ID_INVALID | Invalid Task ID |
| LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK | Check the task ID and do not operate the system-level task, like idle or swtmr task. |
| LOS_ERRNO_TSK_NOT_CREATED | The task is not created. |
| LOS_ERRNO_TSK_IS_ZOMBIE | The task is in a "zombie" state. |
| LOS_OK | The priority of the current running task is successfully set to a specified priority. |
|
extern |
Recycle task stack resource.
| None. |
| None. |
Resume a task.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| LOS_ERRNO_TSK_ID_INVALID | Invalid Task ID |
| LOS_ERRNO_TSK_NOT_CREATED | The task is not created. |
| LOS_ERRNO_TSK_NOT_SUSPENDED | The task is not suspended. |
| LOS_ERRNO_TSK_IS_ZOMBIE | The task is in a "zombie" state. |
| LOS_OK | The task is successfully resumed. |
Suspend a task.
| taskId | [IN] Type UINT32 Task ID. The task id value is obtained from task creation. |
| LOS_ERRNO_TSK_ID_INVALID | Invalid Task ID |
| LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK | Check the task ID and do not operate the system-level task, like idle or swtmr task. |
| 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_ERRNO_TSK_IS_ZOMBIE | The task is in a "zombie" state. |
| LOS_OK | The task is successfully suspended. |
|
extern |
Unlock the task scheduling.
| None. |
| None. |
|
extern |
Unlock the task scheduling and no scheduling is generated.
| None. |
| None. |
|
extern |
Change the scheduling sequence of tasks with the same priority.
| None. |
| LOS_ERRNO_TSK_YIELD_IN_INT | The task yield occurs during an interrupt. |
| LOS_ERRNO_TSK_YIELD_IN_LOCK | The task yield occurs when the task is locked. |
| LOS_ERRNO_TSK_ID_INVALID | The current task ID is invalid. |
| 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. |