提交 591c36dc 编写于 作者: O openharmony_ci 提交者: Gitee

!57 【轻量级 PR】:删除LOS_TaskDelete中用于调试的主动异常信息以及修复LOS_DoMremap中调用LOS_ArchMmuMove参数错误问题

Merge pull request !57 from zhangfanfan2/N/A
......@@ -1204,11 +1204,9 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskDelete(UINT32 taskID)
OS_GOTO_ERREND();
}
if ((taskCB->taskStatus & OS_TASK_FLAG_SYSTEM_TASK) ||
(taskCB->taskStatus & OS_TASK_FLAG_NO_DELETE)) {
if (taskCB->taskStatus & (OS_TASK_FLAG_SYSTEM_TASK | OS_TASK_FLAG_NO_DELETE)) {
SCHEDULER_UNLOCK(intSave);
OsBackTrace();
__asm__ __volatile__("swi 0");
return LOS_ERRNO_TSK_OPERATE_SYSTEM_TASK;
}
processCB = OS_PCB_FROM_PID(taskCB->processID);
......
......@@ -360,7 +360,9 @@ VADDR_T LOS_DoMremap(VADDR_T oldAddress, size_t oldSize, size_t newSize, int fla
ret = -ENOMEM;
goto OUT_MREMAP;
}
status = LOS_ArchMmuMove(&space->archMmu, oldAddress, newAddr, newSize >> PAGE_SHIFT, regionOld->regionFlags);
status = LOS_ArchMmuMove(&space->archMmu, oldAddress, newAddr,
((newSize < regionOld->range.size) ? newSize : regionOld->range.size) >> PAGE_SHIFT,
regionOld->regionFlags);
if (status) {
LOS_RegionFree(space, regionNew);
ret = -ENOMEM;
......@@ -390,8 +392,8 @@ VADDR_T LOS_DoMremap(VADDR_T oldAddress, size_t oldSize, size_t newSize, int fla
ret = -ENOMEM;
goto OUT_MREMAP;
}
status = LOS_ArchMmuMove(&space->archMmu, oldAddress, regionNew->range.base, newSize >> PAGE_SHIFT,
regionOld->regionFlags);
status = LOS_ArchMmuMove(&space->archMmu, oldAddress, regionNew->range.base,
regionOld->range.size >> PAGE_SHIFT, regionOld->regionFlags);
if (status) {
LOS_RegionFree(space, regionNew);
ret = -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册