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

Merge pull request !57 from zhangfanfan2/N/A
This commit is contained in:
openharmony_ci 2021-01-21 10:30:27 +08:00 committed by Gitee
commit 591c36dc17
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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;