fix: correct spelling

correct some typos in los_task.c and other files

close https://gitee.com/openharmony/kernel_liteos_a/issues/I3QDB8
This commit is contained in:
rtos-lover 2021-05-08 11:23:08 +08:00
parent 6012acb509
commit c66fe0313f
6 changed files with 17 additions and 17 deletions

View File

@ -435,7 +435,7 @@ int pthread_detach(pthread_t thread)
/* Set state to detached and kick any joinees to make them return. */ /* Set state to detached and kick any joinees to make them return. */
SCHEDULER_LOCK(intSave); SCHEDULER_LOCK(intSave);
if (!(detached->task->taskStatus & OS_TASK_STATUS_EXIT)) { if (!(detached->task->taskStatus & OS_TASK_STATUS_EXIT)) {
ret = OsTaskSetDeatchUnsafe(detached->task); ret = OsTaskSetDetachUnsafe(detached->task);
if (ret == ESRCH) { if (ret == ESRCH) {
ret = LOS_OK; ret = LOS_OK;
} else if (ret == LOS_OK) { } else if (ret == LOS_OK) {

View File

@ -468,7 +468,7 @@ LITE_OS_SEC_TEXT VOID OsProcessCBRecyleToFree(VOID)
} }
SCHEDULER_UNLOCK(intSave); SCHEDULER_UNLOCK(intSave);
OsTaskCBRecyleToFree(); OsTaskCBRecycleToFree();
SCHEDULER_LOCK(intSave); SCHEDULER_LOCK(intSave);
processCB->processStatus &= ~OS_PROCESS_FLAG_EXIT; processCB->processStatus &= ~OS_PROCESS_FLAG_EXIT;

View File

@ -162,7 +162,7 @@ LITE_OS_SEC_TEXT UINT32 OsTaskJoinPendUnsafe(LosTaskCB *taskCB)
return LOS_EINVAL; return LOS_EINVAL;
} }
LITE_OS_SEC_TEXT UINT32 OsTaskSetDeatchUnsafe(LosTaskCB *taskCB) LITE_OS_SEC_TEXT UINT32 OsTaskSetDetachUnsafe(LosTaskCB *taskCB)
{ {
LosProcessCB *processCB = OS_PCB_FROM_PID(taskCB->processID); LosProcessCB *processCB = OS_PCB_FROM_PID(taskCB->processID);
if (!(processCB->processStatus & OS_PROCESS_STATUS_RUNNING)) { if (!(processCB->processStatus & OS_PROCESS_STATUS_RUNNING)) {
@ -450,7 +450,7 @@ STATIC VOID OsTaskKernelResourcesToFree(UINT32 syncSignal, UINTPTR topOfStack)
(VOID)LOS_MemFree(poolTmp, (VOID *)topOfStack); (VOID)LOS_MemFree(poolTmp, (VOID *)topOfStack);
} }
LITE_OS_SEC_TEXT VOID OsTaskCBRecyleToFree() LITE_OS_SEC_TEXT VOID OsTaskCBRecycleToFree()
{ {
LosTaskCB *taskCB = NULL; LosTaskCB *taskCB = NULL;
UINT32 intSave; UINT32 intSave;
@ -764,7 +764,7 @@ LOS_ERREND:
/* /*
* Check if needs to do the suspend operation on the running task. * Check if needs to do the suspend operation on the running task.
* Return TRUE, if needs to do the suspension. * Return TRUE, if needs to do the suspension.
* Rerturn FALSE, if meets following circumstances: * Return FALSE, if meets following circumstances:
* 1. Do the suspension across cores, if SMP is enabled * 1. Do the suspension across cores, if SMP is enabled
* 2. Do the suspension when preemption is disabled * 2. Do the suspension when preemption is disabled
* 3. Do the suspension in hard-irq * 3. Do the suspension in hard-irq
@ -902,7 +902,7 @@ LITE_OS_SEC_TEXT VOID OsRunTaskToDelete(LosTaskCB *taskCB)
/* /*
* Check if needs to do the delete operation on the running task. * Check if needs to do the delete operation on the running task.
* Return TRUE, if needs to do the deletion. * Return TRUE, if needs to do the deletion.
* Rerturn FALSE, if meets following circumstances: * Return FALSE, if meets following circumstances:
* 1. Do the deletion across cores, if SMP is enabled * 1. Do the deletion across cores, if SMP is enabled
* 2. Do the deletion when preemption is disabled * 2. Do the deletion when preemption is disabled
* 3. Do the deletion in hard-irq * 3. Do the deletion in hard-irq
@ -1167,7 +1167,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskYield(VOID)
} }
SCHEDULER_LOCK(intSave); SCHEDULER_LOCK(intSave);
/* reset timeslice of yeilded task */ /* reset timeslice of yielded task */
OsSchedYield(); OsSchedYield();
SCHEDULER_UNLOCK(intSave); SCHEDULER_UNLOCK(intSave);
return LOS_OK; return LOS_OK;
@ -1327,7 +1327,7 @@ LITE_OS_SEC_TEXT_MINOR VOID OsTaskProcSignal(VOID)
/* /*
* private and uninterruptable, no protection needed. * private and uninterruptable, no protection needed.
* while this task is always running when others cores see it, * while this task is always running when others cores see it,
* so it keeps recieving signals while follow code excuting. * so it keeps receiving signals while follow code executing.
*/ */
LosTaskCB *runTask = OsCurrTaskGet(); LosTaskCB *runTask = OsCurrTaskGet();
if (runTask->signal == SIGNAL_NONE) { if (runTask->signal == SIGNAL_NONE) {
@ -1465,7 +1465,7 @@ LITE_OS_SEC_TEXT VOID OsTaskExitGroup(UINT32 status)
LITE_OS_SEC_TEXT VOID OsExecDestroyTaskGroup(VOID) LITE_OS_SEC_TEXT VOID OsExecDestroyTaskGroup(VOID)
{ {
OsTaskExitGroup(OS_PRO_EXIT_OK); OsTaskExitGroup(OS_PRO_EXIT_OK);
OsTaskCBRecyleToFree(); OsTaskCBRecycleToFree();
} }
LITE_OS_SEC_TEXT VOID OsProcessSuspendAllTask(VOID) LITE_OS_SEC_TEXT VOID OsProcessSuspendAllTask(VOID)
@ -1557,7 +1557,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsCreateUserTask(UINT32 processID, TSK_INIT_PARAM_S
return ret; return ret;
} }
initParam->uwStackSize = OS_USER_TASK_SYSCALL_SATCK_SIZE; initParam->uwStackSize = OS_USER_TASK_SYSCALL_STACK_SIZE;
initParam->usTaskPrio = OS_TASK_PRIORITY_LOWEST; initParam->usTaskPrio = OS_TASK_PRIORITY_LOWEST;
initParam->policy = LOS_SCHED_RR; initParam->policy = LOS_SCHED_RR;
if (processID == OS_INVALID_VALUE) { if (processID == OS_INVALID_VALUE) {
@ -1654,7 +1654,7 @@ STATIC VOID OsResourceRecoveryTask(VOID)
ret = LOS_EventRead(&g_resourceEvent, OS_RESOURCE_EVENT_MASK, ret = LOS_EventRead(&g_resourceEvent, OS_RESOURCE_EVENT_MASK,
LOS_WAITMODE_OR | LOS_WAITMODE_CLR, LOS_WAIT_FOREVER); LOS_WAITMODE_OR | LOS_WAITMODE_CLR, LOS_WAIT_FOREVER);
if (ret & (OS_RESOURCE_EVENT_FREE | OS_RESOURCE_EVENT_OOM)) { if (ret & (OS_RESOURCE_EVENT_FREE | OS_RESOURCE_EVENT_OOM)) {
OsTaskCBRecyleToFree(); OsTaskCBRecycleToFree();
OsProcessCBRecyleToFree(); OsProcessCBRecyleToFree();
} }
@ -1680,7 +1680,7 @@ LITE_OS_SEC_TEXT UINT32 OsCreateResourceFreeTask(VOID)
(VOID)memset_s((VOID *)(&taskInitParam), sizeof(TSK_INIT_PARAM_S), 0, sizeof(TSK_INIT_PARAM_S)); (VOID)memset_s((VOID *)(&taskInitParam), sizeof(TSK_INIT_PARAM_S), 0, sizeof(TSK_INIT_PARAM_S));
taskInitParam.pfnTaskEntry = (TSK_ENTRY_FUNC)OsResourceRecoveryTask; taskInitParam.pfnTaskEntry = (TSK_ENTRY_FUNC)OsResourceRecoveryTask;
taskInitParam.uwStackSize = OS_TASK_RESOURCE_STATCI_SIZE; taskInitParam.uwStackSize = OS_TASK_RESOURCE_STATIC_SIZE;
taskInitParam.pcName = "ResourcesTask"; taskInitParam.pcName = "ResourcesTask";
taskInitParam.usTaskPrio = OS_TASK_RESOURCE_FREE_PRIORITY; taskInitParam.usTaskPrio = OS_TASK_RESOURCE_FREE_PRIORITY;
ret = LOS_TaskCreate(&taskID, &taskInitParam); ret = LOS_TaskCreate(&taskID, &taskInitParam);

View File

@ -303,7 +303,7 @@ STATIC INLINE BOOL OsProcessIsDead(const LosProcessCB *processCB)
((OS_PROCESS_GET_RUNTASK_COUNT(status) - 1) & OS_PROCESS_RUNTASK_COUNT_MASK)) ((OS_PROCESS_GET_RUNTASK_COUNT(status) - 1) & OS_PROCESS_RUNTASK_COUNT_MASK))
#define OS_TASK_DEFAULT_STACK_SIZE 0x2000 #define OS_TASK_DEFAULT_STACK_SIZE 0x2000
#define OS_USER_TASK_SYSCALL_SATCK_SIZE 0x3000 #define OS_USER_TASK_SYSCALL_STACK_SIZE 0x3000
#define OS_USER_TASK_STACK_SIZE 0x100000 #define OS_USER_TASK_STACK_SIZE 0x100000
#define OS_KERNEL_MODE 0x0U #define OS_KERNEL_MODE 0x0U

View File

@ -293,7 +293,7 @@ extern SPIN_LOCK_S g_taskSpin;
#define LOSCFG_STACK_POINT_ALIGN_SIZE (sizeof(UINTPTR) * 2) #define LOSCFG_STACK_POINT_ALIGN_SIZE (sizeof(UINTPTR) * 2)
#endif #endif
#define OS_TASK_RESOURCE_STATCI_SIZE 0x1000 #define OS_TASK_RESOURCE_STATIC_SIZE 0x1000
#define OS_TASK_RESOURCE_FREE_PRIORITY 5 #define OS_TASK_RESOURCE_FREE_PRIORITY 5
#define OS_RESOURCE_EVENT_MASK 0xFF #define OS_RESOURCE_EVENT_MASK 0xFF
#define OS_RESOURCE_EVENT_OOM 0x02 #define OS_RESOURCE_EVENT_OOM 0x02
@ -458,7 +458,7 @@ STATIC INLINE BOOL OsTaskIsInactive(const LosTaskCB *taskCB)
/* get task info */ /* get task info */
#define OS_ALL_TASK_MASK 0xFFFFFFFF #define OS_ALL_TASK_MASK 0xFFFFFFFF
extern UINT32 OsTaskSetDeatchUnsafe(LosTaskCB *taskCB); extern UINT32 OsTaskSetDetachUnsafe(LosTaskCB *taskCB);
extern VOID OsTaskJoinPostUnsafe(LosTaskCB *taskCB); extern VOID OsTaskJoinPostUnsafe(LosTaskCB *taskCB);
extern UINT32 OsTaskJoinPendUnsafe(LosTaskCB *taskCB); extern UINT32 OsTaskJoinPendUnsafe(LosTaskCB *taskCB);
extern BOOL OsTaskCpuAffiSetUnsafe(UINT32 taskID, UINT16 newCpuAffiMask, UINT16 *oldCpuAffiMask); extern BOOL OsTaskCpuAffiSetUnsafe(UINT32 taskID, UINT16 newCpuAffiMask, UINT16 *oldCpuAffiMask);
@ -481,7 +481,7 @@ extern VOID OsRunTaskToDelete(LosTaskCB *taskCB);
extern UINT32 OsTaskSyncWait(const LosTaskCB *taskCB); extern UINT32 OsTaskSyncWait(const LosTaskCB *taskCB);
extern UINT32 OsCreateUserTask(UINT32 processID, TSK_INIT_PARAM_S *initParam); extern UINT32 OsCreateUserTask(UINT32 processID, TSK_INIT_PARAM_S *initParam);
extern INT32 OsSetTaskName(LosTaskCB *taskCB, const CHAR *name, BOOL setPName); extern INT32 OsSetTaskName(LosTaskCB *taskCB, const CHAR *name, BOOL setPName);
extern VOID OsTaskCBRecyleToFree(VOID); extern VOID OsTaskCBRecycleToFree(VOID);
extern VOID OsTaskExitGroup(UINT32 status); extern VOID OsTaskExitGroup(UINT32 status);
extern VOID OsTaskToExit(LosTaskCB *taskCB, UINT32 status); extern VOID OsTaskToExit(LosTaskCB *taskCB, UINT32 status);
extern VOID OsExecDestroyTaskGroup(VOID); extern VOID OsExecDestroyTaskGroup(VOID);

View File

@ -901,7 +901,7 @@ int SysUserThreadSetDeatch(unsigned int taskID)
goto EXIT; goto EXIT;
} }
ret = OsTaskSetDeatchUnsafe(taskCB); ret = OsTaskSetDetachUnsafe(taskCB);
EXIT: EXIT:
SCHEDULER_UNLOCK(intSave); SCHEDULER_UNLOCK(intSave);