diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-20 15:28:25 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-09-27 18:04:55 +0200 |
commit | d2ce4e92fa4f79a5fdb4cc912b411280afe21697 (patch) | |
tree | d7b1cae518d150b30342cef8dfa1a76e82005d25 /arch/x86/um/syscalls_32.c | |
parent | um: let signal_delivered() do SIGTRAP on singlestepping into handler (diff) | |
download | linux-d2ce4e92fa4f79a5fdb4cc912b411280afe21697.tar.xz linux-d2ce4e92fa4f79a5fdb4cc912b411280afe21697.zip |
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/x86/um/syscalls_32.c')
-rw-r--r-- | arch/x86/um/syscalls_32.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/arch/x86/um/syscalls_32.c b/arch/x86/um/syscalls_32.c index b853e8600b9d..db444c7218fe 100644 --- a/arch/x86/um/syscalls_32.c +++ b/arch/x86/um/syscalls_32.c @@ -3,37 +3,24 @@ * Licensed under the GPL */ -#include "linux/sched.h" -#include "linux/shm.h" -#include "linux/ipc.h" -#include "linux/syscalls.h" -#include "asm/mman.h" -#include "asm/uaccess.h" -#include "asm/unistd.h" +#include <linux/syscalls.h> +#include <sysdep/syscalls.h> /* * The prototype on i386 is: * - * int clone(int flags, void * child_stack, int * parent_tidptr, struct user_desc * newtls, int * child_tidptr) + * int clone(int flags, void * child_stack, int * parent_tidptr, struct user_desc * newtls * * and the "newtls" arg. on i386 is read by copy_thread directly from the * register saved on the stack. */ -long sys_clone(unsigned long clone_flags, unsigned long newsp, - int __user *parent_tid, void *newtls, int __user *child_tid) +long i386_clone(unsigned long clone_flags, unsigned long newsp, + int __user *parent_tid, void *newtls, int __user *child_tid) { - long ret; - - if (!newsp) - newsp = UPT_SP(¤t->thread.regs.regs); - - current->thread.forking = 1; - ret = do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid, - child_tid); - current->thread.forking = 0; - return ret; + return sys_clone(clone_flags, newsp, parent_tid, child_tid); } + long sys_sigaction(int sig, const struct old_sigaction __user *act, struct old_sigaction __user *oact) { |