If a task has finished all its work or is not needed anymore, you can terminate it using the os_tsk_delete function. The os_tsk_delete function stops and deletes the task identified by task_id. The os_tsk_delete function is in the RL-RTX library. The pro
//Create a task taskID1 =os_tsk_create(task1,0); taskID2 =os_tsk_create(task2,0); os_tsk_delete_self();// Delete the init(self) task } intmain(void) { //Necessary Initialization //... os_sys_init(init); } 运行后,会有两个同等优先级的task,task1和task2。 2.简单的时间管理...
27、LOS_ERRNO_TSK_CP_SAVE_AREA_NOT_ALIGN0x0200021b该错误码暂不使用。 28、LOS_ERRNO_TSK_MSG_Q_TOO_MANY0x0200021d该错误码暂不使用。 29、LOS_ERRNO_TSK_CP_SAVE_AREA_NULL0x0200021e该错误码暂不使用。 30、LOS_ERRNO_TSK_SELF_DELETE_ERR0x0200021f该错误码暂不使用。 31、LOS_ERRNO_TSK_STKS...
27、LOS_ERRNO_TSK_CP_SAVE_AREA_NOT_ALIGN 0x0200021b 该错误码暂不使用。 28、LOS_ERRNO_TSK_MSG_Q_TOO_MANY 0x0200021d 该错误码暂不使用。 29、LOS_ERRNO_TSK_CP_SAVE_AREA_NULL 0x0200021e 该错误码暂不使用。 30、LOS_ERRNO_TSK_SELF_DELETE_ERR 0x0200021f 该错误码暂不使用。 31、LOS_ERR...
LOS_ERRNO_TSK_SELF_DELETE_ERR 0x0200021f 暂不使用该错误码 - 31 LOS_ERRNO_TSK_STKSZ_TOO_LARGE 0x02000220 创建任务时,设置了过大的任务栈 减小任务栈大小 32 LOS_ERRNO_TSK_SUSPEND_SWTMR_NOT_ALLOWED 0x02000221 暂不使用该错误码 - 34 LOS_ERRNO_TSK_CPU_AFFINITY_MASK_ERR 0x03000223 设置指定...
stTskInitParam.usTaskPrio= OS_TASK_PRIORITY_LOWEST - ((UINT16)(attr->priority) - LOS_PRIORITY_WIN);/*0~31*/stTskInitParam.uwResved= LOS_TASK_STATUS_DETACHED;/*the cmsis task is detached,the task can deleteself*/uwRet= LOS_TaskCreate(&uwTid, &stTskInitParam);if(LOS_OK !=uwRet...
The os_tsk_self function identifies the currently running task by returning its task ID. The os_tsk_self function is in the RL-RTX library. The prototype is defined in rtl.h. The os_tsk_self function returns the task identifier number (TID) of the curren
1.1.13 osTaskSelfDelete( )函数 功能:TASK 自删除。 传入参数: uwTaskID:TASK ID 号。 uvIntSave:中断相关变量,调用该函数时中断已经被 ,需要在该函数中通过该值来 恢复被 中断。 Line 350:由TASK 的ID 号获取到TCB 。 Line 352:READY 状态说明TASK 处于优先级队列参与系统调度,需要将其从优先级队列 ...
#define OS_SELF_TASK_ID NULL #define OS_TASK_PRIORITY_NORMAL (tskIDLE_PRIORITY + 1) #define OS_TASK_PRIORITY_HIGH (tskIDLE_PRIORITY + 2) #define OS_MS_TO_SYSTICKS(n) (n) #define OS_SYSTICKS_TO_MS(n) (n) #define osGetSystemTime64() osGetSystemTime() #define osEnterTask() #de...
30 LOS_ERRNO_TSK_SELF_DELETE_ERR 0x0200021f 暂无 该错误码暂不使用 31 LOS_ERRNO_TSK_STKSZ_TOO_LARGE 0x02000220 任务栈大小设置过大 减小任务栈大小 32 LOS_ERRNO_TSK_SUSPEND_SWTMR_NOT_ALLOWED 0x02000221 不允许挂起软件定时器任务 检查任务ID, 不要试图挂起软件定时器任务 对任务存在失败可能性的操...