WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
los_task.h 文件参考
#include "los_base.h"
#include "los_list.h"
#include "los_sys.h"
#include "los_tick.h"
#include "los_event.h"
#include "los_memory.h"
#include "los_err.h"
#include "arch/task.h"
los_task.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  tagTskInitParam
 
struct  tagTskInfo
 

宏定义

#define CPUID_TO_AFFI_MASK(cpuid)   (0x1u << (cpuid))
 
#define LOS_TASK_PRIORITY_HIGHEST   0
 
#define LOS_TASK_PRIORITY_LOWEST   31
 
#define LOS_ERRNO_TSK_NO_MEMORY   LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x00)
 
#define LOS_ERRNO_TSK_PTR_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x01)
 
#define LOS_ERRNO_TSK_STKSZ_NOT_ALIGN   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x02)
 
#define LOS_ERRNO_TSK_PRIOR_ERROR   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x03)
 
#define LOS_ERRNO_TSK_ENTRY_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x04)
 
#define LOS_ERRNO_TSK_NAME_EMPTY   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x05)
 
#define LOS_ERRNO_TSK_STKSZ_TOO_SMALL   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x06)
 
#define LOS_ERRNO_TSK_ID_INVALID   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x07)
 
#define LOS_ERRNO_TSK_ALREADY_SUSPENDED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x08)
 
#define LOS_ERRNO_TSK_NOT_SUSPENDED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x09)
 
#define LOS_ERRNO_TSK_NOT_CREATED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x0a)
 
#define LOS_ERRNO_TSK_DELETE_LOCKED   LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x0b)
 
#define LOS_ERRNO_TSK_MSG_NONZERO   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x0c)
 
#define LOS_ERRNO_TSK_DELAY_IN_INT   LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x0d)
 
#define LOS_ERRNO_TSK_DELAY_IN_LOCK   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x0e)
 
#define LOS_ERRNO_TSK_YIELD_IN_LOCK   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x0f)
 
#define LOS_ERRNO_TSK_YIELD_NOT_ENOUGH_TASK   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x10)
 
#define LOS_ERRNO_TSK_TCB_UNAVAILABLE   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x11)
 
#define LOS_ERRNO_TSK_HOOK_NOT_MATCH   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x12)
 
#define LOS_ERRNO_TSK_HOOK_IS_FULL   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x13)
 
#define LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x14)
 
#define LOS_ERRNO_TSK_SUSPEND_LOCKED   LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x15)
 
#define LOS_ERRNO_TSK_FREE_STACK_FAILED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x17)
 
#define LOS_ERRNO_TSK_STKAREA_TOO_SMALL   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x18)
 
#define LOS_ERRNO_TSK_ACTIVE_FAILED   LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x19)
 
#define LOS_ERRNO_TSK_CONFIG_TOO_MANY   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1a)
 
#define LOS_ERRNO_TSK_CP_SAVE_AREA_NOT_ALIGN   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1b)
 
#define LOS_ERRNO_TSK_MSG_Q_TOO_MANY   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1d)
 
#define LOS_ERRNO_TSK_CP_SAVE_AREA_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1e)
 
#define LOS_ERRNO_TSK_SELF_DELETE_ERR   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x1f)
 
#define LOS_ERRNO_TSK_STKSZ_TOO_LARGE   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x20)
 
#define LOS_ERRNO_TSK_SUSPEND_SWTMR_NOT_ALLOWED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x21)
 
#define LOS_ERRNO_TSK_CPU_AFFINITY_MASK_ERR   LOS_ERRNO_OS_FATAL(LOS_MOD_TSK, 0x23)
 
#define LOS_ERRNO_TSK_YIELD_IN_INT   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x24)
 
#define LOS_ERRNO_TSK_MP_SYNC_RESOURCE   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x25)
 
#define LOS_ERRNO_TSK_MP_SYNC_FAILED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x26)
 
#define LOS_ERRNO_TSK_ALLOC_SECURE_INT   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x27)
 
#define LOS_ERRNO_TSK_SECURE_ALREADY_ALLOC   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x28)
 
#define LOS_ERRNO_TSK_ALLOC_SECURE_FAILED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x29)
 
#define LOS_ERRNO_TSK_FREE_SECURE_FAILED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2a)
 
#define LOS_ERRNO_TSK_NOT_ALLOW_IN_INT   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2b)
 
#define LOS_ERRNO_TSK_SCHED_LOCKED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2c)
 
#define LOS_ERRNO_TSK_ALREADY_JOIN   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2d)
 
#define LOS_ERRNO_TSK_IS_DETACHED   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2e)
 
#define LOS_ERRNO_TSK_NOT_JOIN_SELF   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x2f)
 
#define LOS_ERRNO_TSK_IS_ZOMBIE   LOS_ERRNO_OS_ERROR(LOS_MOD_TSK, 0x30)
 
#define LOS_TASK_MIN_STACK_SIZE   (LOS_Align(KERNEL_TSK_MIN_STACK_SIZE, LOSCFG_STACK_POINT_ALIGN_SIZE))
 
#define LOS_TASK_NAMELEN   32
 
#define LOS_TASK_PARAM_INIT_ARG(initParam, arg)    (initParam.pArgs = (VOID *)(arg))
 

类型定义

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.
 

宏定义说明

◆ CPUID_TO_AFFI_MASK

#define CPUID_TO_AFFI_MASK (   cpuid)    (0x1u << (cpuid))

◆ LOS_TASK_PARAM_INIT_ARG

#define LOS_TASK_PARAM_INIT_ARG (   initParam,
  arg 
)     (initParam.pArgs = (VOID *)(arg))