Lines Matching refs:taskID
78 #define OS_TASK_ID_CHECK(taskID) (OS_TSK_GET_INDEX(taskID) < g_taskMaxNum) argument
84 #define OS_CHECK_TSK_PID_NOIDLE(taskID) (OS_TSK_GET_INDEX(taskID) >= g_taskMaxNum) argument
120 STATIC_INLINE UINT32 OsCheckTaskIDValid(UINT32 taskID) in OsCheckTaskIDValid() argument
123 if (taskID == g_idleTaskID) { in OsCheckTaskIDValid()
126 } else if (taskID == g_swtmrTaskID) { in OsCheckTaskIDValid()
129 } else if (OS_TSK_GET_INDEX(taskID) >= g_taskMaxNum) { in OsCheckTaskIDValid()
137 UINT32 taskID = taskCB->taskID; in OsInsertTCBToFreeList() local
139 taskCB->taskID = taskID; in OsInsertTCBToFreeList()
239 UINT32 OsGetTaskWaterLine(UINT32 taskID) in OsGetTaskWaterLine() argument
244 if (*(UINT32 *)(UINTPTR)OS_TCB_FROM_TID(taskID)->topOfStack == OS_TASK_MAGIC_WORD) { in OsGetTaskWaterLine()
245 … stackPtr = (UINT32 *)(UINTPTR)(OS_TCB_FROM_TID(taskID)->topOfStack + OS_TASK_STACK_TOP_OFFSET); in OsGetTaskWaterLine()
246 …while ((stackPtr < (UINT32 *)(OS_TCB_FROM_TID(taskID)->stackPointer)) && (*stackPtr == OS_TASK_STA… in OsGetTaskWaterLine()
249 peakUsed = OS_TCB_FROM_TID(taskID)->stackSize - in OsGetTaskWaterLine()
250 ((UINT32)(UINTPTR)stackPtr - OS_TCB_FROM_TID(taskID)->topOfStack); in OsGetTaskWaterLine()
252 PRINT_ERR("CURRENT task %s stack overflow!\n", OS_TCB_FROM_TID(taskID)->taskName); in OsGetTaskWaterLine()
313 taskCB->taskID, taskCB->priority, OsConvertTskStatus(taskCB->taskStatus), in PrintTskInfo()
320 taskCB->taskID, taskCB->priority, OsConvertTskStatus(taskCB->taskStatus), in PrintTskInfo()
321 taskCB->stackSize, OsGetTaskWaterLine(taskCB->taskID), in PrintTskInfo()
395 cpuLessOneSec[taskCB->taskID].uwUsage / LOS_CPUP_PRECISION_MULT, in OsGetAllTskInfo()
396 cpuLessOneSec[taskCB->taskID].uwUsage % LOS_CPUP_PRECISION_MULT, in OsGetAllTskInfo()
397 cpuTenSec[taskCB->taskID].uwUsage / LOS_CPUP_PRECISION_MULT, in OsGetAllTskInfo()
398 cpuTenSec[taskCB->taskID].uwUsage % LOS_CPUP_PRECISION_MULT, in OsGetAllTskInfo()
399 cpuOneSec[taskCB->taskID].uwUsage / LOS_CPUP_PRECISION_MULT, in OsGetAllTskInfo()
400 cpuOneSec[taskCB->taskID].uwUsage % LOS_CPUP_PRECISION_MULT); in OsGetAllTskInfo()
439 g_taskCBArray[index].taskID = index; in OsTaskInit()
446 g_losTask.runTask->taskID = index; in OsTaskInit()
493 return g_losTask.runTask->taskID; in LOS_CurTaskIDGet()
506 UINT32 taskID = OsGetTopTask()->taskID; in LOS_NextTaskIDGet() local
509 return taskID; in LOS_NextTaskIDGet()
542 g_losTask.runTask->taskName, g_losTask.runTask->taskID); in OsHandleRunTaskStackOverflow()
558 g_losTask.newTask->taskName, g_losTask.newTask->taskID); in OsHandleNewTaskStackOverflow()
627 g_taskSwitchInfo.pid[g_taskSwitchInfo.idx] = (UINT16)(g_losTask.newTask->taskID); in OsTaskSwitchCheck()
668 LITE_OS_SEC_TEXT_INIT VOID OsTaskEntry(UINT32 taskID) in OsTaskEntry() argument
671 LosTaskCB *taskCB = OS_TCB_FROM_TID(taskID); in OsTaskEntry()
674 retVal = LOS_TaskDelete(taskCB->taskID); in OsTaskEntry()
676 PRINT_ERR("Delete Task[TID: %d] Failed!\n", taskCB->taskID); in OsTaskEntry()
769 …taskCB->stackPointer = ArchTskStackInit(taskCB->taskID, taskCB->stackSize, (VOID *)taskCB->topOfSt… in OsNewTaskInit()
780 LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskCreateOnly(UINT32 *taskID, TSK_INIT_PARAM_S *taskInitParam) in LOS_TaskCreateOnly() argument
786 if (taskID == NULL) { in LOS_TaskCreateOnly()
819 g_cpup[taskCB->taskID].cpupID = taskCB->taskID; in LOS_TaskCreateOnly()
820 g_cpup[taskCB->taskID].status = taskCB->taskStatus; in LOS_TaskCreateOnly()
823 *taskID = taskCB->taskID; in LOS_TaskCreateOnly()
835 LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskCreate(UINT32 *taskID, TSK_INIT_PARAM_S *taskInitParam) in LOS_TaskCreate() argument
841 retVal = LOS_TaskCreateOnly(taskID, taskInitParam); in LOS_TaskCreate()
845 taskCB = OS_TCB_FROM_TID(*taskID); in LOS_TaskCreate()
866 LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskResume(UINT32 taskID) in LOS_TaskResume() argument
874 if (!OS_TASK_ID_CHECK(taskID)) { in LOS_TaskResume()
878 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskResume()
912 LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskSuspend(UINT32 taskID) in LOS_TaskSuspend() argument
919 retErr = OsCheckTaskIDValid(taskID); in LOS_TaskSuspend()
924 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskSuspend()
950 if (taskID == g_losTask.runTask->taskID) { in LOS_TaskSuspend()
1003 LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskJoin(UINT32 taskID, UINTPTR *retval) in LOS_TaskJoin() argument
1010 ret = OsCheckTaskIDValid(taskID); in LOS_TaskJoin()
1023 if (taskID == LOS_CurTaskIDGet()) { in LOS_TaskJoin()
1027 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskJoin()
1054 LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskDetach(UINT32 taskID) in LOS_TaskDetach() argument
1060 ret = OsCheckTaskIDValid(taskID); in LOS_TaskDetach()
1069 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskDetach()
1078 return LOS_TaskJoin(taskID, NULL); in LOS_TaskDetach()
1086 LITE_OS_SEC_TEXT_INIT STATIC_INLINE VOID OsRunningTaskDelete(UINT32 taskID, LosTaskCB *taskCB) in OsRunningTaskDelete() argument
1090 g_losTask.runTask->taskID = taskID; in OsRunningTaskDelete()
1102 LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskDelete(UINT32 taskID) in LOS_TaskDelete() argument
1108 UINT32 ret = OsCheckTaskIDValid(taskID); in LOS_TaskDelete()
1113 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskDelete()
1150 (VOID)memset_s((VOID *)&g_cpup[taskCB->taskID], sizeof(OsCpupCB), 0, sizeof(OsCpupCB)); in LOS_TaskDelete()
1165 OsRunningTaskDelete(taskID, taskCB); in LOS_TaskDelete()
1215 LITE_OS_SEC_TEXT_MINOR UINT16 LOS_TaskPriGet(UINT32 taskID) in LOS_TaskPriGet() argument
1221 if (OS_CHECK_TSK_PID_NOIDLE(taskID)) { in LOS_TaskPriGet()
1225 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskPriGet()
1239 LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskPriSet(UINT32 taskID, UINT16 taskPrio) in LOS_TaskPriSet() argument
1250 if (taskID == g_idleTaskID) { in LOS_TaskPriSet()
1255 if (taskID == g_swtmrTaskID) { in LOS_TaskPriSet()
1260 if (OS_CHECK_TSK_PID_NOIDLE(taskID)) { in LOS_TaskPriSet()
1264 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskPriSet()
1288 return LOS_TaskPriSet(g_losTask.runTask->taskID, taskPrio); in LOS_CurTaskPriSet()
1349 LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskInfoGet(UINT32 taskID, TSK_INFO_S *taskInfo) in LOS_TaskInfoGet() argument
1358 if (OS_CHECK_TSK_PID_NOIDLE(taskID)) { in LOS_TaskInfoGet()
1362 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskInfoGet()
1383 taskInfo->uwTaskID = taskID; in LOS_TaskInfoGet()
1391 taskInfo->uwPeakUsed = OsGetTaskWaterLine(taskID); in LOS_TaskInfoGet()
1398 LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskStatusGet(UINT32 taskID, UINT32 *taskStatus) in LOS_TaskStatusGet() argument
1407 if (OS_CHECK_TSK_PID_NOIDLE(taskID)) { in LOS_TaskStatusGet()
1411 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskStatusGet()
1501 LITE_OS_SEC_TEXT CHAR* LOS_TaskNameGet(UINT32 taskID) in LOS_TaskNameGet() argument
1506 if (OS_CHECK_TSK_PID_NOIDLE(taskID)) { in LOS_TaskNameGet()
1510 taskCB = OS_TCB_FROM_TID(taskID); in LOS_TaskNameGet()