Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
d9774e01
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
464
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看板
提交
d9774e01
编写于
7月 21, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 21, 2021
浏览文件
操作
浏览文件
下载
差异文件
!447 chore: fix function and variable name spell issues
Merge pull request !447 from kenneth/chore
上级
c610578d
58d4366e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
24 deletion
+24
-24
kernel/base/core/los_process.c
kernel/base/core/los_process.c
+13
-13
kernel/base/core/los_sortlink.c
kernel/base/core/los_sortlink.c
+3
-3
kernel/base/core/los_task.c
kernel/base/core/los_task.c
+7
-7
kernel/base/include/los_process_pri.h
kernel/base/include/los_process_pri.h
+1
-1
未找到文件。
kernel/base/core/los_process.c
浏览文件 @
d9774e01
...
...
@@ -57,7 +57,7 @@
LITE_OS_SEC_BSS
LosProcessCB
*
g_processCBArray
=
NULL
;
LITE_OS_SEC_DATA_INIT
STATIC
LOS_DL_LIST
g_freeProcess
;
LITE_OS_SEC_DATA_INIT
STATIC
LOS_DL_LIST
g_processRecyleList
;
LITE_OS_SEC_DATA_INIT
STATIC
LOS_DL_LIST
g_processRecy
c
leList
;
LITE_OS_SEC_BSS
UINT32
g_userInitProcess
=
OS_INVALID_VALUE
;
LITE_OS_SEC_BSS
UINT32
g_kernelInitProcess
=
OS_INVALID_VALUE
;
LITE_OS_SEC_BSS
UINT32
g_kernelIdleProcess
=
OS_INVALID_VALUE
;
...
...
@@ -331,9 +331,9 @@ LITE_OS_SEC_TEXT STATIC VOID OsRecycleZombiesProcess(LosProcessCB *childCB, Proc
LOS_ListDelete
(
&
childCB
->
pendList
);
if
(
childCB
->
processStatus
&
OS_PROCESS_FLAG_EXIT
)
{
LOS_ListHeadInsert
(
&
g_processRecyleList
,
&
childCB
->
pendList
);
LOS_ListHeadInsert
(
&
g_processRecy
c
leList
,
&
childCB
->
pendList
);
}
else
if
(
childCB
->
processStatus
&
OS_PROCESS_FLAG_GROUP_LEADER
)
{
LOS_ListTailInsert
(
&
g_processRecyleList
,
&
childCB
->
pendList
);
LOS_ListTailInsert
(
&
g_processRecy
c
leList
,
&
childCB
->
pendList
);
}
else
{
OsInsertPCBToFreeList
(
childCB
);
}
...
...
@@ -413,7 +413,7 @@ STATIC VOID OsProcessNaturalExit(LosTaskCB *runTask, UINT32 status)
#ifdef LOSCFG_KERNEL_VM
(
VOID
)
OsKill
(
processCB
->
parentProcessID
,
SIGCHLD
,
OS_KERNEL_KILL_PERMISSION
);
#endif
LOS_ListHeadInsert
(
&
g_processRecyleList
,
&
processCB
->
pendList
);
LOS_ListHeadInsert
(
&
g_processRecy
c
leList
,
&
processCB
->
pendList
);
OsRunTaskToDelete
(
runTask
);
return
;
}
...
...
@@ -437,7 +437,7 @@ STATIC UINT32 OsProcessInit(VOID)
(
VOID
)
memset_s
(
g_processCBArray
,
size
,
0
,
size
);
LOS_ListInit
(
&
g_freeProcess
);
LOS_ListInit
(
&
g_processRecyleList
);
LOS_ListInit
(
&
g_processRecy
c
leList
);
for
(
index
=
0
;
index
<
g_processMaxNum
;
index
++
)
{
g_processCBArray
[
index
].
processID
=
index
;
...
...
@@ -457,14 +457,14 @@ STATIC UINT32 OsProcessInit(VOID)
return
LOS_OK
;
}
LITE_OS_SEC_TEXT
VOID
OsProcessCBRecyleToFree
(
VOID
)
LITE_OS_SEC_TEXT
VOID
OsProcessCBRecy
c
leToFree
(
VOID
)
{
UINT32
intSave
;
LosProcessCB
*
processCB
=
NULL
;
SCHEDULER_LOCK
(
intSave
);
while
(
!
LOS_ListEmpty
(
&
g_processRecyleList
))
{
processCB
=
OS_PCB_FROM_PENDLIST
(
LOS_DL_LIST_FIRST
(
&
g_processRecyleList
));
while
(
!
LOS_ListEmpty
(
&
g_processRecy
c
leList
))
{
processCB
=
OS_PCB_FROM_PENDLIST
(
LOS_DL_LIST_FIRST
(
&
g_processRecy
c
leList
));
if
(
!
(
processCB
->
processStatus
&
OS_PROCESS_FLAG_EXIT
))
{
break
;
}
...
...
@@ -487,7 +487,7 @@ LITE_OS_SEC_TEXT VOID OsProcessCBRecyleToFree(VOID)
LOS_ListDelete
(
&
processCB
->
pendList
);
if
((
processCB
->
processStatus
&
OS_PROCESS_FLAG_GROUP_LEADER
)
||
(
processCB
->
processStatus
&
OS_PROCESS_STATUS_ZOMBIES
))
{
LOS_ListTailInsert
(
&
g_processRecyleList
,
&
processCB
->
pendList
);
LOS_ListTailInsert
(
&
g_processRecy
c
leList
,
&
processCB
->
pendList
);
}
else
{
/* Clear the bottom 4 bits of process status */
OsInsertPCBToFreeList
(
processCB
);
...
...
@@ -525,7 +525,7 @@ STATIC VOID OsDeInitPCB(LosProcessCB *processCB)
processCB
->
processStatus
&=
~
OS_PROCESS_STATUS_INIT
;
processCB
->
processStatus
|=
OS_PROCESS_FLAG_EXIT
;
LOS_ListHeadInsert
(
&
g_processRecyleList
,
&
processCB
->
pendList
);
LOS_ListHeadInsert
(
&
g_processRecy
c
leList
,
&
processCB
->
pendList
);
SCHEDULER_UNLOCK
(
intSave
);
(
VOID
)
LOS_MemFree
(
m_aucSysMem1
,
group
);
...
...
@@ -1005,7 +1005,7 @@ WAIT_BACK:
return
LOS_OK
;
}
STATIC
UINT32
OsWaitRecycleChildP
or
cess
(
const
LosProcessCB
*
childCB
,
UINT32
intSave
,
INT32
*
status
)
STATIC
UINT32
OsWaitRecycleChildP
ro
cess
(
const
LosProcessCB
*
childCB
,
UINT32
intSave
,
INT32
*
status
)
{
ProcessGroup
*
group
=
NULL
;
UINT32
pid
=
childCB
->
processID
;
...
...
@@ -1081,7 +1081,7 @@ LITE_OS_SEC_TEXT INT32 LOS_Wait(INT32 pid, USER INT32 *status, UINT32 options, V
}
if
(
childCB
!=
NULL
)
{
return
(
INT32
)
OsWaitRecycleChildP
or
cess
(
childCB
,
intSave
,
status
);
return
(
INT32
)
OsWaitRecycleChildP
ro
cess
(
childCB
,
intSave
,
status
);
}
if
((
options
&
LOS_WAIT_WNOHANG
)
!=
0
)
{
...
...
@@ -1104,7 +1104,7 @@ LITE_OS_SEC_TEXT INT32 LOS_Wait(INT32 pid, USER INT32 *status, UINT32 options, V
goto
ERROR
;
}
return
(
INT32
)
OsWaitRecycleChildP
or
cess
(
childCB
,
intSave
,
status
);
return
(
INT32
)
OsWaitRecycleChildP
ro
cess
(
childCB
,
intSave
,
status
);
ERROR:
SCHEDULER_UNLOCK
(
intSave
);
...
...
kernel/base/core/los_sortlink.c
浏览文件 @
d9774e01
...
...
@@ -122,10 +122,10 @@ STATIC INLINE UINT64 OsGetSortLinkNextExpireTime(SortLinkAttribute *sortHeader,
return
expirTime
;
}
STATIC
Percpu
*
OsFindIdleCpu
(
UINT16
*
i
ld
eCpuID
)
STATIC
Percpu
*
OsFindIdleCpu
(
UINT16
*
i
dl
eCpuID
)
{
Percpu
*
idleCpu
=
OsPercpuGetByID
(
0
);
*
i
ld
eCpuID
=
0
;
*
i
dl
eCpuID
=
0
;
#ifdef LOSCFG_KERNEL_SMP
UINT16
cpuID
=
1
;
...
...
@@ -136,7 +136,7 @@ STATIC Percpu *OsFindIdleCpu(UINT16 *ildeCpuID)
UINT32
temp
=
cpu
->
taskSortLink
.
nodeNum
+
cpu
->
swtmrSortLink
.
nodeNum
;
if
(
nodeNum
>
temp
)
{
idleCpu
=
cpu
;
*
i
ld
eCpuID
=
cpuID
;
*
i
dl
eCpuID
=
cpuID
;
}
cpuID
++
;
...
...
kernel/base/core/los_task.c
浏览文件 @
d9774e01
...
...
@@ -67,7 +67,7 @@
LITE_OS_SEC_BSS
LosTaskCB
*
g_taskCBArray
;
LITE_OS_SEC_BSS
LOS_DL_LIST
g_losFreeTask
;
LITE_OS_SEC_BSS
LOS_DL_LIST
g_taskRecyleList
;
LITE_OS_SEC_BSS
LOS_DL_LIST
g_taskRecy
c
leList
;
LITE_OS_SEC_BSS
UINT32
g_taskMaxNum
;
LITE_OS_SEC_BSS
UINT32
g_taskScheduled
;
/* one bit for each cores */
LITE_OS_SEC_BSS
EVENT_CB_S
g_resourceEvent
;
...
...
@@ -201,7 +201,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsTaskInit(VOID)
(
VOID
)
memset_s
(
g_taskCBArray
,
size
,
0
,
size
);
LOS_ListInit
(
&
g_losFreeTask
);
LOS_ListInit
(
&
g_taskRecyleList
);
LOS_ListInit
(
&
g_taskRecy
c
leList
);
for
(
index
=
0
;
index
<
g_taskMaxNum
;
index
++
)
{
g_taskCBArray
[
index
].
taskStatus
=
OS_TASK_STATUS_UNUSED
;
g_taskCBArray
[
index
].
taskID
=
index
;
...
...
@@ -450,8 +450,8 @@ LITE_OS_SEC_TEXT VOID OsTaskCBRecycleToFree()
UINT32
intSave
;
SCHEDULER_LOCK
(
intSave
);
while
(
!
LOS_ListEmpty
(
&
g_taskRecyleList
))
{
taskCB
=
OS_TCB_FROM_PENDLIST
(
LOS_DL_LIST_FIRST
(
&
g_taskRecyleList
));
while
(
!
LOS_ListEmpty
(
&
g_taskRecy
c
leList
))
{
taskCB
=
OS_TCB_FROM_PENDLIST
(
LOS_DL_LIST_FIRST
(
&
g_taskRecy
c
leList
));
LOS_ListDelete
(
&
taskCB
->
pendList
);
SCHEDULER_UNLOCK
(
intSave
);
...
...
@@ -888,7 +888,7 @@ LITE_OS_SEC_TEXT VOID OsRunTaskToDelete(LosTaskCB *runTask)
LOS_ListDelete
(
&
runTask
->
threadList
);
processCB
->
threadNumber
--
;
LOS_ListTailInsert
(
&
g_taskRecyleList
,
&
runTask
->
pendList
);
LOS_ListTailInsert
(
&
g_taskRecy
c
leList
,
&
runTask
->
pendList
);
OsEventWriteUnsafe
(
&
g_resourceEvent
,
OS_RESOURCE_EVENT_FREE
,
FALSE
,
NULL
);
OsSchedResched
();
...
...
@@ -962,7 +962,7 @@ STATIC VOID OsTaskDeleteInactive(LosProcessCB *processCB, LosTaskCB *taskCB)
LOS_ListDelete
(
&
taskCB
->
threadList
);
processCB
->
threadNumber
--
;
LOS_ListTailInsert
(
&
g_taskRecyleList
,
&
taskCB
->
pendList
);
LOS_ListTailInsert
(
&
g_taskRecy
c
leList
,
&
taskCB
->
pendList
);
return
;
}
...
...
@@ -1650,7 +1650,7 @@ STATIC VOID OsResourceRecoveryTask(VOID)
if
(
ret
&
(
OS_RESOURCE_EVENT_FREE
|
OS_RESOURCE_EVENT_OOM
))
{
OsTaskCBRecycleToFree
();
OsProcessCBRecyleToFree
();
OsProcessCBRecy
c
leToFree
();
}
#ifdef LOSCFG_ENABLE_OOM_LOOP_TASK
...
...
kernel/base/include/los_process_pri.h
浏览文件 @
d9774e01
...
...
@@ -441,7 +441,7 @@ extern UINTPTR __user_init_bss;
extern
UINTPTR
__user_init_end
;
extern
UINTPTR
__user_init_load_addr
;
extern
UINT32
OsSystemProcessCreate
(
VOID
);
extern
VOID
OsProcessCBRecyleToFree
(
VOID
);
extern
VOID
OsProcessCBRecy
c
leToFree
(
VOID
);
extern
VOID
OsProcessResourcesToFree
(
LosProcessCB
*
processCB
);
extern
VOID
OsProcessExit
(
LosTaskCB
*
runTask
,
INT32
status
);
extern
UINT32
OsUserInitProcess
(
VOID
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录