Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
6f99abfc
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6f99abfc
编写于
5月 19, 2021
作者:
O
openharmony_ci
提交者:
Gitee
5月 19, 2021
浏览文件
操作
浏览文件
下载
差异文件
!222 fix: correct spelling
Merge pull request !222 from rtos-lover/los_task
上级
a5de5e0c
c66fe031
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
17 addition
and
17 deletion
+17
-17
compat/posix/src/pthread.c
compat/posix/src/pthread.c
+1
-1
kernel/base/core/los_process.c
kernel/base/core/los_process.c
+1
-1
kernel/base/core/los_task.c
kernel/base/core/los_task.c
+10
-10
kernel/base/include/los_process_pri.h
kernel/base/include/los_process_pri.h
+1
-1
kernel/base/include/los_task_pri.h
kernel/base/include/los_task_pri.h
+3
-3
syscall/process_syscall.c
syscall/process_syscall.c
+1
-1
未找到文件。
compat/posix/src/pthread.c
浏览文件 @
6f99abfc
...
...
@@ -435,7 +435,7 @@ int pthread_detach(pthread_t thread)
/* Set state to detached and kick any joinees to make them return. */
SCHEDULER_LOCK
(
intSave
);
if
(
!
(
detached
->
task
->
taskStatus
&
OS_TASK_STATUS_EXIT
))
{
ret
=
OsTaskSetDe
at
chUnsafe
(
detached
->
task
);
ret
=
OsTaskSetDe
ta
chUnsafe
(
detached
->
task
);
if
(
ret
==
ESRCH
)
{
ret
=
LOS_OK
;
}
else
if
(
ret
==
LOS_OK
)
{
...
...
kernel/base/core/los_process.c
浏览文件 @
6f99abfc
...
...
@@ -468,7 +468,7 @@ LITE_OS_SEC_TEXT VOID OsProcessCBRecyleToFree(VOID)
}
SCHEDULER_UNLOCK
(
intSave
);
OsTaskCBRecyleToFree
();
OsTaskCBRecy
c
leToFree
();
SCHEDULER_LOCK
(
intSave
);
processCB
->
processStatus
&=
~
OS_PROCESS_FLAG_EXIT
;
...
...
kernel/base/core/los_task.c
浏览文件 @
6f99abfc
...
...
@@ -162,7 +162,7 @@ LITE_OS_SEC_TEXT UINT32 OsTaskJoinPendUnsafe(LosTaskCB *taskCB)
return
LOS_EINVAL
;
}
LITE_OS_SEC_TEXT
UINT32
OsTaskSetDe
at
chUnsafe
(
LosTaskCB
*
taskCB
)
LITE_OS_SEC_TEXT
UINT32
OsTaskSetDe
ta
chUnsafe
(
LosTaskCB
*
taskCB
)
{
LosProcessCB
*
processCB
=
OS_PCB_FROM_PID
(
taskCB
->
processID
);
if
(
!
(
processCB
->
processStatus
&
OS_PROCESS_STATUS_RUNNING
))
{
...
...
@@ -450,7 +450,7 @@ STATIC VOID OsTaskKernelResourcesToFree(UINT32 syncSignal, UINTPTR topOfStack)
(
VOID
)
LOS_MemFree
(
poolTmp
,
(
VOID
*
)
topOfStack
);
}
LITE_OS_SEC_TEXT
VOID
OsTaskCBRecyleToFree
()
LITE_OS_SEC_TEXT
VOID
OsTaskCBRecy
c
leToFree
()
{
LosTaskCB
*
taskCB
=
NULL
;
UINT32
intSave
;
...
...
@@ -764,7 +764,7 @@ LOS_ERREND:
/*
* Check if needs to do the suspend operation on the running task.
* Return TRUE, if needs to do the suspension.
* Re
r
turn FALSE, if meets following circumstances:
* Return FALSE, if meets following circumstances:
* 1. Do the suspension across cores, if SMP is enabled
* 2. Do the suspension when preemption is disabled
* 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.
* Return TRUE, if needs to do the deletion.
* Re
r
turn FALSE, if meets following circumstances:
* Return FALSE, if meets following circumstances:
* 1. Do the deletion across cores, if SMP is enabled
* 2. Do the deletion when preemption is disabled
* 3. Do the deletion in hard-irq
...
...
@@ -1167,7 +1167,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskYield(VOID)
}
SCHEDULER_LOCK
(
intSave
);
/* reset timeslice of y
ei
lded task */
/* reset timeslice of y
ie
lded task */
OsSchedYield
();
SCHEDULER_UNLOCK
(
intSave
);
return
LOS_OK
;
...
...
@@ -1327,7 +1327,7 @@ LITE_OS_SEC_TEXT_MINOR VOID OsTaskProcSignal(VOID)
/*
* private and uninterruptable, no protection needed.
* while this task is always running when others cores see it,
* so it keeps rec
ieving signals while follow code ex
cuting.
* so it keeps rec
eiving signals while follow code exe
cuting.
*/
LosTaskCB
*
runTask
=
OsCurrTaskGet
();
if
(
runTask
->
signal
==
SIGNAL_NONE
)
{
...
...
@@ -1465,7 +1465,7 @@ LITE_OS_SEC_TEXT VOID OsTaskExitGroup(UINT32 status)
LITE_OS_SEC_TEXT
VOID
OsExecDestroyTaskGroup
(
VOID
)
{
OsTaskExitGroup
(
OS_PRO_EXIT_OK
);
OsTaskCBRecyleToFree
();
OsTaskCBRecy
c
leToFree
();
}
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
;
}
initParam
->
uwStackSize
=
OS_USER_TASK_SYSCALL_S
AT
CK_SIZE
;
initParam
->
uwStackSize
=
OS_USER_TASK_SYSCALL_S
TA
CK_SIZE
;
initParam
->
usTaskPrio
=
OS_TASK_PRIORITY_LOWEST
;
initParam
->
policy
=
LOS_SCHED_RR
;
if
(
processID
==
OS_INVALID_VALUE
)
{
...
...
@@ -1654,7 +1654,7 @@ STATIC VOID OsResourceRecoveryTask(VOID)
ret
=
LOS_EventRead
(
&
g_resourceEvent
,
OS_RESOURCE_EVENT_MASK
,
LOS_WAITMODE_OR
|
LOS_WAITMODE_CLR
,
LOS_WAIT_FOREVER
);
if
(
ret
&
(
OS_RESOURCE_EVENT_FREE
|
OS_RESOURCE_EVENT_OOM
))
{
OsTaskCBRecyleToFree
();
OsTaskCBRecy
c
leToFree
();
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
));
taskInitParam
.
pfnTaskEntry
=
(
TSK_ENTRY_FUNC
)
OsResourceRecoveryTask
;
taskInitParam
.
uwStackSize
=
OS_TASK_RESOURCE_STAT
CI
_SIZE
;
taskInitParam
.
uwStackSize
=
OS_TASK_RESOURCE_STAT
IC
_SIZE
;
taskInitParam
.
pcName
=
"ResourcesTask"
;
taskInitParam
.
usTaskPrio
=
OS_TASK_RESOURCE_FREE_PRIORITY
;
ret
=
LOS_TaskCreate
(
&
taskID
,
&
taskInitParam
);
...
...
kernel/base/include/los_process_pri.h
浏览文件 @
6f99abfc
...
...
@@ -303,7 +303,7 @@ STATIC INLINE BOOL OsProcessIsDead(const LosProcessCB *processCB)
((OS_PROCESS_GET_RUNTASK_COUNT(status) - 1) & OS_PROCESS_RUNTASK_COUNT_MASK))
#define OS_TASK_DEFAULT_STACK_SIZE 0x2000
#define OS_USER_TASK_SYSCALL_S
AT
CK_SIZE 0x3000
#define OS_USER_TASK_SYSCALL_S
TA
CK_SIZE 0x3000
#define OS_USER_TASK_STACK_SIZE 0x100000
#define OS_KERNEL_MODE 0x0U
...
...
kernel/base/include/los_task_pri.h
浏览文件 @
6f99abfc
...
...
@@ -293,7 +293,7 @@ extern SPIN_LOCK_S g_taskSpin;
#define LOSCFG_STACK_POINT_ALIGN_SIZE (sizeof(UINTPTR) * 2)
#endif
#define OS_TASK_RESOURCE_STAT
CI
_SIZE 0x1000
#define OS_TASK_RESOURCE_STAT
IC
_SIZE 0x1000
#define OS_TASK_RESOURCE_FREE_PRIORITY 5
#define OS_RESOURCE_EVENT_MASK 0xFF
#define OS_RESOURCE_EVENT_OOM 0x02
...
...
@@ -458,7 +458,7 @@ STATIC INLINE BOOL OsTaskIsInactive(const LosTaskCB *taskCB)
/* get task info */
#define OS_ALL_TASK_MASK 0xFFFFFFFF
extern
UINT32
OsTaskSetDe
at
chUnsafe
(
LosTaskCB
*
taskCB
);
extern
UINT32
OsTaskSetDe
ta
chUnsafe
(
LosTaskCB
*
taskCB
);
extern
VOID
OsTaskJoinPostUnsafe
(
LosTaskCB
*
taskCB
);
extern
UINT32
OsTaskJoinPendUnsafe
(
LosTaskCB
*
taskCB
);
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
OsCreateUserTask
(
UINT32
processID
,
TSK_INIT_PARAM_S
*
initParam
);
extern
INT32
OsSetTaskName
(
LosTaskCB
*
taskCB
,
const
CHAR
*
name
,
BOOL
setPName
);
extern
VOID
OsTaskCBRecyleToFree
(
VOID
);
extern
VOID
OsTaskCBRecy
c
leToFree
(
VOID
);
extern
VOID
OsTaskExitGroup
(
UINT32
status
);
extern
VOID
OsTaskToExit
(
LosTaskCB
*
taskCB
,
UINT32
status
);
extern
VOID
OsExecDestroyTaskGroup
(
VOID
);
...
...
syscall/process_syscall.c
浏览文件 @
6f99abfc
...
...
@@ -901,7 +901,7 @@ int SysUserThreadSetDeatch(unsigned int taskID)
goto
EXIT
;
}
ret
=
OsTaskSetDe
at
chUnsafe
(
taskCB
);
ret
=
OsTaskSetDe
ta
chUnsafe
(
taskCB
);
EXIT:
SCHEDULER_UNLOCK
(
intSave
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录