summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/syscall.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-20 09:28:25 -0400
committerRichard Weinberger <richard@nod.at>2012-09-27 18:04:55 +0200
commitd2ce4e92fa4f79a5fdb4cc912b411280afe21697 (patch)
treed7b1cae518d150b30342cef8dfa1a76e82005d25 /arch/um/kernel/syscall.c
parentf9a38eace4498a5e9f6d2cdfc879d5444edc3a5f (diff)
downloadop-kernel-dev-d2ce4e92fa4f79a5fdb4cc912b411280afe21697.zip
op-kernel-dev-d2ce4e92fa4f79a5fdb4cc912b411280afe21697.tar.gz
um: kill thread->forking
we only use that to tell copy_thread() done by syscall from that done by kernel_thread(). However, it's easier to do simply by checking PF_KTHREAD in thread flags. Merge sys_clone() guts for 32bit and 64bit, while we are at it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/um/kernel/syscall.c')
-rw-r--r--arch/um/kernel/syscall.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c
index f958cb8..a4c6d8e 100644
--- a/arch/um/kernel/syscall.c
+++ b/arch/um/kernel/syscall.c
@@ -17,25 +17,25 @@
long sys_fork(void)
{
- long ret;
-
- current->thread.forking = 1;
- ret = do_fork(SIGCHLD, UPT_SP(&current->thread.regs.regs),
+ return do_fork(SIGCHLD, UPT_SP(&current->thread.regs.regs),
&current->thread.regs, 0, NULL, NULL);
- current->thread.forking = 0;
- return ret;
}
long sys_vfork(void)
{
- long ret;
-
- current->thread.forking = 1;
- ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
+ return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
UPT_SP(&current->thread.regs.regs),
&current->thread.regs, 0, NULL, NULL);
- current->thread.forking = 0;
- return ret;
+}
+
+long sys_clone(unsigned long clone_flags, unsigned long newsp,
+ void __user *parent_tid, void __user *child_tid)
+{
+ if (!newsp)
+ newsp = UPT_SP(&current->thread.regs.regs);
+
+ return do_fork(clone_flags, newsp, &current->thread.regs, 0, parent_tid,
+ child_tid);
}
long old_mmap(unsigned long addr, unsigned long len,
OpenPOWER on IntegriCloud