clone: support CLONE_PARENT

This commit is contained in:
Tomoki Shirasawa
2016-01-11 16:49:02 +09:00
parent 2819ec2197
commit 3a2f7b0106
4 changed files with 93 additions and 27 deletions

View File

@@ -308,28 +308,6 @@ clone_thread(struct thread *org, unsigned long pc, unsigned long sp,
struct process *proc = NULL;
struct address_space *asp = NULL;
if (termsig < 0 || _NSIG < termsig) {
return (void *)-EINVAL;
}
if((clone_flags & CLONE_SIGHAND) &&
!(clone_flags & CLONE_VM))
return (void *)-EINVAL;
if((clone_flags & CLONE_THREAD) &&
!(clone_flags & CLONE_SIGHAND))
return (void *)-EINVAL;
if((clone_flags & CLONE_FS) &&
(clone_flags & CLONE_NEWNS))
return (void *)-EINVAL;
if((clone_flags & CLONE_NEWIPC) &&
(clone_flags & CLONE_SYSVSEM))
return (void *)-EINVAL;
if((clone_flags & CLONE_NEWPID) &&
(clone_flags & CLONE_THREAD))
return (void *)-EINVAL;
if ((thread = ihk_mc_alloc_pages(KERNEL_STACK_NR_PAGES,
IHK_MC_AP_NOWAIT)) == NULL) {
return NULL;