Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
ebfac57d
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看板
提交
ebfac57d
编写于
10月 30, 2021
作者:
O
openharmony_ci
提交者:
Gitee
10月 30, 2021
浏览文件
操作
浏览文件
下载
差异文件
!685 fix: 优化liteipc任务状态,删除功能重复字段
Merge pull request !685 from zhushengle/liteipc
上级
3074449c
5004ef4d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
7 addition
and
21 deletion
+7
-21
kernel/base/include/los_task_pri.h
kernel/base/include/los_task_pri.h
+0
-1
kernel/base/ipc/los_signal.c
kernel/base/ipc/los_signal.c
+0
-3
kernel/base/sched/sched_sq/los_sched.c
kernel/base/sched/sched_sq/los_sched.c
+0
-3
kernel/extended/liteipc/hm_liteipc.c
kernel/extended/liteipc/hm_liteipc.c
+7
-9
kernel/extended/liteipc/hm_liteipc.h
kernel/extended/liteipc/hm_liteipc.h
+0
-5
未找到文件。
kernel/base/include/los_task_pri.h
浏览文件 @
ebfac57d
...
...
@@ -359,7 +359,6 @@ typedef struct {
UINT16
waitFlag
;
/**< The type of child process that is waiting, belonging to a group or parent,
a specific child process, or any child process */
#ifdef LOSCFG_KERNEL_LITEIPC
UINT32
ipcStatus
;
LOS_DL_LIST
msgListHead
;
BOOL
accessMap
[
LOSCFG_BASE_CORE_TSK_LIMIT
];
#endif
...
...
kernel/base/ipc/los_signal.c
浏览文件 @
ebfac57d
...
...
@@ -157,13 +157,10 @@ STATIC UINT32 OsPendingTaskWake(LosTaskCB *taskCB, INT32 signo)
case
OS_TASK_WAIT_SIGNAL
:
OsSigWaitTaskWake
(
taskCB
,
signo
);
break
;
#ifdef LOSCFG_KERNEL_LITEIPC
case
OS_TASK_WAIT_LITEIPC
:
taskCB
->
ipcStatus
&=
~
IPC_THREAD_STATUS_PEND
;
OsTaskWakeClearPendMask
(
taskCB
);
OsSchedTaskWake
(
taskCB
);
break
;
#endif
case
OS_TASK_WAIT_FUTEX
:
OsFutexNodeDeleteFromFutexHash
(
&
taskCB
->
futex
,
TRUE
,
NULL
,
NULL
);
OsTaskWakeClearPendMask
(
taskCB
);
...
...
kernel/base/sched/sched_sq/los_sched.c
浏览文件 @
ebfac57d
...
...
@@ -472,9 +472,6 @@ STATIC INLINE VOID OsSchedWakePendTimeTask(UINT64 currTime, LosTaskCB *taskCB, B
if
(
tempStatus
&
(
OS_TASK_STATUS_PENDING
|
OS_TASK_STATUS_DELAY
))
{
taskCB
->
taskStatus
&=
~
(
OS_TASK_STATUS_PENDING
|
OS_TASK_STATUS_PEND_TIME
|
OS_TASK_STATUS_DELAY
);
if
(
tempStatus
&
OS_TASK_STATUS_PENDING
)
{
#ifdef LOSCFG_KERNEL_LITEIPC
taskCB
->
ipcStatus
&=
~
IPC_THREAD_STATUS_PEND
;
#endif
taskCB
->
taskStatus
|=
OS_TASK_STATUS_TIMEOUT
;
LOS_ListDelete
(
&
taskCB
->
pendList
);
taskCB
->
taskMux
=
NULL
;
...
...
kernel/extended/liteipc/hm_liteipc.c
浏览文件 @
ebfac57d
...
...
@@ -953,9 +953,8 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcWrite(IpcContent *content)
SCHEDULER_LOCK
(
intSave
);
LosTaskCB
*
tcb
=
OS_TCB_FROM_TID
(
dstTid
);
LOS_ListTailInsert
(
&
(
tcb
->
msgListHead
),
&
(
buf
->
listNode
));
OsHookCall
(
LOS_HOOK_TYPE_IPC_WRITE
,
&
buf
->
msg
,
dstTid
,
tcb
->
processID
,
tcb
->
ipcStatus
);
if
(
tcb
->
ipcStatus
&
IPC_THREAD_STATUS_PEND
)
{
tcb
->
ipcStatus
&=
~
IPC_THREAD_STATUS_PEND
;
OsHookCall
(
LOS_HOOK_TYPE_IPC_WRITE
,
&
buf
->
msg
,
dstTid
,
tcb
->
processID
,
tcb
->
waitFlag
);
if
(
tcb
->
waitFlag
==
OS_TASK_WAIT_LITEIPC
)
{
OsTaskWakeClearPendMask
(
tcb
);
OsSchedTaskWake
(
tcb
);
SCHEDULER_UNLOCK
(
intSave
);
...
...
@@ -1011,11 +1010,11 @@ LITE_OS_SEC_TEXT STATIC UINT32 CheckRecievedMsg(IpcListNode *node, IpcContent *c
ret
=
-
EINVAL
;
}
if
(
ret
!=
LOS_OK
)
{
OsHookCall
(
LOS_HOOK_TYPE_IPC_READ_DROP
,
&
node
->
msg
,
tcb
->
ipcStatus
);
OsHookCall
(
LOS_HOOK_TYPE_IPC_READ_DROP
,
&
node
->
msg
,
tcb
->
waitFlag
);
(
VOID
)
HandleSpecialObjects
(
LOS_CurTaskIDGet
(),
node
,
TRUE
);
(
VOID
)
LiteIpcNodeFree
(
LOS_GetCurrProcessID
(),
(
VOID
*
)
node
);
}
else
{
OsHookCall
(
LOS_HOOK_TYPE_IPC_READ
,
&
node
->
msg
,
tcb
->
ipcStatus
);
OsHookCall
(
LOS_HOOK_TYPE_IPC_READ
,
&
node
->
msg
,
tcb
->
waitFlag
);
}
return
ret
;
}
...
...
@@ -1035,18 +1034,17 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcRead(IpcContent *content)
do
{
SCHEDULER_LOCK
(
intSave
);
if
(
LOS_ListEmpty
(
listHead
))
{
OsHookCall
(
LOS_HOOK_TYPE_IPC_TRY_READ
,
syncFlag
?
MT_REPLY
:
MT_REQUEST
,
tcb
->
ipcStatus
);
tcb
->
ipcStatus
|=
IPC_THREAD_STATUS_PEND
;
OsTaskWaitSetPendMask
(
OS_TASK_WAIT_LITEIPC
,
OS_INVALID_VALUE
,
timeout
);
OsHookCall
(
LOS_HOOK_TYPE_IPC_TRY_READ
,
syncFlag
?
MT_REPLY
:
MT_REQUEST
,
tcb
->
waitFlag
);
ret
=
OsSchedTaskWait
(
&
g_ipcPendlist
,
timeout
,
TRUE
);
if
(
ret
==
LOS_ERRNO_TSK_TIMEOUT
)
{
OsHookCall
(
LOS_HOOK_TYPE_IPC_READ_TIMEOUT
,
syncFlag
?
MT_REPLY
:
MT_REQUEST
,
tcb
->
ipcStatus
);
OsHookCall
(
LOS_HOOK_TYPE_IPC_READ_TIMEOUT
,
syncFlag
?
MT_REPLY
:
MT_REQUEST
,
tcb
->
waitFlag
);
SCHEDULER_UNLOCK
(
intSave
);
return
-
ETIME
;
}
if
(
OsTaskIsKilled
(
tcb
))
{
OsHookCall
(
LOS_HOOK_TYPE_IPC_KILL
,
syncFlag
?
MT_REPLY
:
MT_REQUEST
,
tcb
->
ipcStatus
);
OsHookCall
(
LOS_HOOK_TYPE_IPC_KILL
,
syncFlag
?
MT_REPLY
:
MT_REQUEST
,
tcb
->
waitFlag
);
SCHEDULER_UNLOCK
(
intSave
);
return
-
ERFKILL
;
}
...
...
kernel/extended/liteipc/hm_liteipc.h
浏览文件 @
ebfac57d
...
...
@@ -169,11 +169,6 @@ typedef struct {
VOID
*
buffToFree
;
}
IpcContent
;
#define IPC_THREAD_STATUS_INVAL 0x0001U
#define IPC_THREAD_STATUS_START 0x0002U
#define IPC_THREAD_STATUS_PEND 0x0004U
#define IPC_THREAD_STATUS_STOP 0x0008U
/* init liteipc driver */
extern
UINT32
OsLiteIpcInit
(
VOID
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录