Home
last modified time | relevance | path

Searched refs:taskCb (Results 1 – 17 of 17) sorted by relevance

/kernel/uniproton/src/core/kernel/task/
Dprt_amp_task_del.c19 OS_SEC_L4_TEXT void OsTaskDeleteResInit(struct TagTskCb *taskCb) in OsTaskDeleteResInit() argument
22 if (((OS_TSK_PEND | OS_TSK_QUEUE_PEND) & taskCb->taskStatus) != 0) { in OsTaskDeleteResInit()
23 ListDelete(&taskCb->pendList); in OsTaskDeleteResInit()
26 if (((OS_TSK_DELAY | OS_TSK_TIMEOUT) & taskCb->taskStatus) != 0) { in OsTaskDeleteResInit()
27 ListDelete(&taskCb->timerList); in OsTaskDeleteResInit()
30 if ((OS_TSK_READY & taskCb->taskStatus) != 0) { in OsTaskDeleteResInit()
31 OsTskReadyDel(taskCb); in OsTaskDeleteResInit()
34 taskCb->taskStatus &= (~(OS_TSK_SUSPEND)); in OsTaskDeleteResInit()
35 taskCb->taskStatus |= OS_TSK_UNUSED; in OsTaskDeleteResInit()
47 struct TagTskCb *taskCb = NULL; in OsTaskDelete() local
[all …]
Dprt_task_info.c18 OS_SEC_ALW_INLINE INLINE bool OsTaskSpPcInfoReady(struct TagTskCb *taskCb) in OsTaskSpPcInfoReady() argument
20 return (bool)(((taskCb->taskStatus & OS_TSK_RUNNING) == 0) || (OS_INT_ACTIVE)); in OsTaskSpPcInfoReady()
23 OS_SEC_L2_TEXT uintptr_t OsTaskSpInfoGet(struct TagTskCb *taskCb) in OsTaskSpInfoGet() argument
27 if (OsTaskSpPcInfoReady(taskCb)) { in OsTaskSpInfoGet()
28 sp = (uintptr_t)taskCb->stackPointer; in OsTaskSpInfoGet()
36 OS_SEC_L2_TEXT void OsTaskSpPcGet(struct TagTskCb *taskCb, struct TskInfo *taskInfo) in OsTaskSpPcGet() argument
38 if (OsTaskSpPcInfoReady(taskCb)) { in OsTaskSpPcGet()
39 taskInfo->sp = (uintptr_t)taskCb->stackPointer; in OsTaskSpPcGet()
40 taskInfo->pc = OsTskGetInstrAddr((uintptr_t)taskCb->stackPointer); in OsTaskSpPcGet()
58 OS_SEC_ALW_INLINE INLINE void OsTaskInfoCommonGet(struct TskInfo *taskInfo, struct TagTskCb *taskCb in OsTaskInfoCommonGet() argument
[all …]
Dprt_task_init.c66 struct TagTskCb *taskCb = GET_TCB_HANDLE(taskId); in OsTaskNameAdd() local
68 if (strncpy_s(taskCb->name, sizeof(taskCb->name), name, OS_TSK_NAME_LEN - 1) != EOK) { in OsTaskNameAdd()
77 struct TagTskCb *taskCb = GET_TCB_HANDLE(taskId); in OsTaskNameGet() local
79 *taskName = taskCb->name; in OsTaskNameGet()
151 struct TagTskCb *taskCb = NULL; in OsTskEntry() local
156 taskCb = RUNNING_TASK; in OsTskEntry()
158taskCb->taskEntry(taskCb->args[OS_TSK_PARA_0], taskCb->args[OS_TSK_PARA_1], taskCb->args[OS_TSK_PA… in OsTskEntry()
159 taskCb->args[OS_TSK_PARA_3]); in OsTskEntry()
169 OsTaskExit(taskCb); in OsTskEntry()
225 struct TagTskCb *taskCb = NULL; in OsTskRecycle() local
[all …]
Dprt_amp_task.c81 struct TagTskCb *taskCb = NULL; in OsTaskScan() local
85 LIST_FOR_EACH(taskCb, tskSortedDelayList, struct TagTskCb, timerList) { in OsTaskScan()
86 if (taskCb->expirationTick > g_uniTicks) { in OsTaskScan()
90 ListDelete(&taskCb->timerList); in OsTaskScan()
92 if ((OS_TSK_PEND & taskCb->taskStatus) != 0) { in OsTaskScan()
93 TSK_STATUS_CLEAR(taskCb, OS_TSK_PEND); in OsTaskScan()
94 ListDelete(&taskCb->pendList); in OsTaskScan()
95 taskCb->taskSem = NULL; in OsTaskScan()
96 } else if ((OS_TSK_EVENT_PEND & taskCb->taskStatus) != 0) { in OsTaskScan()
97 TSK_STATUS_CLEAR(taskCb, OS_TSK_EVENT_PEND); in OsTaskScan()
[all …]
Dprt_amp_task_minor.c23 struct TagTskCb *taskCb = NULL; in PRT_TaskSuspend() local
33 taskCb = GET_TCB_HANDLE(taskPid); in PRT_TaskSuspend()
37 if (taskCb->taskStatus == OS_TSK_UNUSED) { in PRT_TaskSuspend()
44 if ((OS_TSK_SUSPEND & taskCb->taskStatus) != 0) { in PRT_TaskSuspend()
50 if (((OS_TSK_RUNNING & taskCb->taskStatus) != 0) && (g_uniTaskLock != 0)) { in PRT_TaskSuspend()
58 if ((OS_TSK_READY & taskCb->taskStatus) != 0) { in PRT_TaskSuspend()
59 OsTskReadyDel(taskCb); in PRT_TaskSuspend()
62 taskCb->taskStatus |= OS_TSK_SUSPEND; in PRT_TaskSuspend()
64 if ((OS_TSK_RUNNING & taskCb->taskStatus) != 0) { in PRT_TaskSuspend()
78 struct TagTskCb *taskCb = NULL; in PRT_TaskResume() local
[all …]
Dprt_task_priority.c23 struct TagTskCb *taskCb = NULL; in PRT_TaskGetPriority() local
33 taskCb = GET_TCB_HANDLE(taskPid); in PRT_TaskGetPriority()
37 if (TSK_IS_UNUSED(taskCb)) { in PRT_TaskGetPriority()
43 *taskPrio = taskCb->priority; in PRT_TaskGetPriority()
74 struct TagTskCb *taskCb = NULL; in PRT_TaskSetPriority() local
81 taskCb = GET_TCB_HANDLE(taskPid); in PRT_TaskSetPriority()
83 if (TSK_IS_UNUSED(taskCb)) { in PRT_TaskSetPriority()
88 isReady = (OS_TSK_READY & taskCb->taskStatus); in PRT_TaskSetPriority()
92 OsTskReadyDel(taskCb); in PRT_TaskSetPriority()
93 taskCb->priority = taskPrio; in PRT_TaskSetPriority()
[all …]
Dprt_task_internal.h39 extern U32 OsTaskDelStatusCheck(struct TagTskCb *taskCb);
41 OS_SEC_ALW_INLINE INLINE void OsMoveTaskToReady(struct TagTskCb *taskCb) in OsMoveTaskToReady() argument
44 if ((taskCb->taskStatus & OS_TSK_BLOCK) == 0) { in OsMoveTaskToReady()
45 OsTskReadyAdd(taskCb); in OsMoveTaskToReady()
54 OS_SEC_ALW_INLINE INLINE void OsTskResRecycle(struct TagTskCb *taskCb) in OsTskResRecycle() argument
56 if (taskCb->stackCfgFlg == OS_TSK_STACK_CFG_BY_SYS) { in OsTskResRecycle()
57 OS_ERR_RECORD(PRT_MemFree((U32)OS_MID_TSK, (void *)taskCb->topOfStack)); in OsTskResRecycle()
Dprt_task.c55 OS_SEC_L0_TEXT void OsTskReadyDel(struct TagTskCb *taskCb) in OsTskReadyDel() argument
58 TSK_STATUS_CLEAR(taskCb, OS_TSK_READY); in OsTskReadyDel()
60 OS_TSK_DE_QUE(runQue, taskCb, 0); in OsTskReadyDel()
69 OS_SEC_L0_TEXT void OsTskTimerAdd(struct TagTskCb *taskCb, uintptr_t timeout) in OsTskTimerAdd() argument
77 taskCb->expirationTick = g_uniTicks + timeout; in OsTskTimerAdd()
81 ListTailAdd(&taskCb->timerList, taskList); in OsTskTimerAdd()
85 if (tskDelay->expirationTick > taskCb->expirationTick) { in OsTskTimerAdd()
90 ListTailAdd(&taskCb->timerList, &tskDelay->timerList); in OsTskTimerAdd()
Dprt_task_sem.c25 struct TagTskCb *taskCb = NULL; in PRT_TaskGetPendSem() local
37 taskCb = GET_TCB_HANDLE(taskId); in PRT_TaskGetPendSem()
40 if (TSK_IS_UNUSED(taskCb)) { in PRT_TaskGetPendSem()
47 *pendState = OS_TSK_PEND & taskCb->taskStatus; in PRT_TaskGetPendSem()
50 *semId = ((struct TagSemCb *)taskCb->taskSem)->semId; in PRT_TaskGetPendSem()
Dprt_task_attrib.c22 struct TagTskCb *taskCb = NULL; in PRT_TaskGetStatus() local
28 taskCb = GET_TCB_HANDLE(taskPid); in PRT_TaskGetStatus()
30 return (TskStatus)taskCb->taskStatus; in PRT_TaskGetStatus()
Dprt_task_del.c21 OS_SEC_L4_TEXT U32 OsTaskDelStatusCheck(struct TagTskCb *taskCb) in OsTaskDelStatusCheck() argument
25 if ((taskCb == RUNNING_TASK) && (OS_TASK_LOCK_DATA != 0)) { in OsTaskDelStatusCheck()
30 if (TSK_STATUS_TST(taskCb, OS_TSK_QUEUE_BUSY)) { in OsTaskDelStatusCheck()
/kernel/uniproton/src/core/ipc/event/
Dprt_event.c143 OS_SEC_ALW_INLINE INLINE void OsEventStateChange(U32 taskStatus, struct TagTskCb *taskCb) in OsEventStateChange() argument
150 OS_TSK_DELAY_LOCKED_DETACH(taskCb); in OsEventStateChange()
151 TSK_STATUS_CLEAR(taskCb, OS_TSK_TIMEOUT); in OsEventStateChange()
155 OsTskReadyAddBgd(taskCb); in OsEventStateChange()
164 struct TagTskCb *taskCb = NULL; in PRT_EventWrite() local
179 taskCb = (struct TagTskCb *)GET_TCB_HANDLE(taskId); in PRT_EventWrite()
180 taskStatus = taskCb->taskStatus; in PRT_EventWrite()
181 if (TSK_IS_UNUSED(taskCb)) { in PRT_EventWrite()
187 taskCb->event |= events; in PRT_EventWrite()
191 eventMask = taskCb->eventMask; in PRT_EventWrite()
[all …]
/kernel/uniproton/src/core/ipc/sem/
Dprt_sem.c62 struct TagTskCb *taskCb = GET_TCB_PEND(LIST_FIRST(&(semPended->semList))); in OsSemPendListGet() local
66 if (TSK_STATUS_TST(taskCb, OS_TSK_TIMEOUT)) { in OsSemPendListGet()
67 OS_TSK_DELAY_LOCKED_DETACH(taskCb); in OsSemPendListGet()
71 TSK_STATUS_CLEAR(taskCb, OS_TSK_TIMEOUT | OS_TSK_PEND); in OsSemPendListGet()
72 taskCb->taskSem = NULL; in OsSemPendListGet()
74 if (!TSK_STATUS_TST(taskCb, OS_TSK_SUSPEND)) { in OsSemPendListGet()
75 OsTskReadyAddBgd(taskCb); in OsSemPendListGet()
78 return taskCb; in OsSemPendListGet()
/kernel/uniproton/src/om/err/
Dprt_err.c40 struct TagTskCb *taskCb = NULL; in OsErrRecord() local
45 taskCb = GET_TCB_HANDLE(RUNNING_TASK->taskPid); in OsErrRecord()
46 taskCb->lastErr = errorNo; in OsErrRecord()
/kernel/uniproton/src/core/kernel/include/
Dprt_task_external.h185 extern void OsTskReadyDel(struct TagTskCb *taskCb);
187 extern void OsTskTimerAdd(struct TagTskCb *taskCb, uintptr_t timeout);
/kernel/liteos_m/kal/cmsis/
Dcmsis_liteos2.c319 LosTaskCB *taskCb = (LosTaskCB *)osThreadGetId(); in osThreadGetArgument() local
320 if (taskCb == NULL) { in osThreadGetArgument()
323 return (void *)(taskCb->arg); in osThreadGetArgument()
/kernel/liteos_a/kernel/extended/liteipc/
Dhm_liteipc.c799 LosTaskCB *taskCb = OS_TCB_FROM_TID(obj->content.svc.handle); in HandleSvc() local
800 if (taskCb->ipcTaskInfo == NULL) { in HandleSvc()
801 taskCb->ipcTaskInfo = LiteIpcTaskInit(); in HandleSvc()