提交 3194fcca 编写于 作者: 冷钦街 提交者: Gitee

update kernel/base/core/los_process.c.

上级 90b9c37b
...@@ -1607,18 +1607,15 @@ STATIC UINT32 OsCopyParent(UINT32 flags, LosProcessCB *childProcessCB, LosProces ...@@ -1607,18 +1607,15 @@ STATIC UINT32 OsCopyParent(UINT32 flags, LosProcessCB *childProcessCB, LosProces
if (flags & CLONE_PARENT) { if (flags & CLONE_PARENT) {
parentProcessCB = OS_PCB_FROM_PID(runProcessCB->parentProcessID); parentProcessCB = OS_PCB_FROM_PID(runProcessCB->parentProcessID);
} else {
parentProcessCB = runProcessCB;
}
childProcessCB->parentProcessID = parentProcessCB->processID; childProcessCB->parentProcessID = parentProcessCB->processID;
LOS_ListTailInsert(&parentProcessCB->childrenList, &childProcessCB->siblingList); LOS_ListTailInsert(&parentProcessCB->childrenList, &childProcessCB->siblingList);
childProcessCB->group = parentProcessCB->group; childProcessCB->group = parentProcessCB->group;
LOS_ListTailInsert(&parentProcessCB->group->processList, &childProcessCB->subordinateGroupList); LOS_ListTailInsert(&parentProcessCB->group->processList, &childProcessCB->subordinateGroupList);
ret = OsCopyUser(childProcessCB, parentProcessCB); ret = OsCopyUser(childProcessCB, parentProcessCB);
} else {
childProcessCB->parentProcessID = runProcessCB->processID;
LOS_ListTailInsert(&runProcessCB->childrenList, &childProcessCB->siblingList);
childProcessCB->group = runProcessCB->group;
LOS_ListTailInsert(&runProcessCB->group->processList, &childProcessCB->subordinateGroupList);
ret = OsCopyUser(childProcessCB, runProcessCB);
}
SCHEDULER_UNLOCK(intSave); SCHEDULER_UNLOCK(intSave);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册