diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-22 22:34:11 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-28 22:13:44 -0500 |
commit | 1d4b4b2994b5fc208963c0b795291f8c1f18becf (patch) | |
tree | befe27a3e2abc333b5bd81ee7381e4c5541f543f /arch/x86/kernel/process.c | |
parent | 71613c3b871c5a9f27cc48f124251bcd3aa23be1 (diff) |
x86, um: switch to generic fork/vfork/clone
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index b644e1c765dc..fe9459593257 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -262,36 +262,6 @@ void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, | |||
262 | propagate_user_return_notify(prev_p, next_p); | 262 | propagate_user_return_notify(prev_p, next_p); |
263 | } | 263 | } |
264 | 264 | ||
265 | int sys_fork(struct pt_regs *regs) | ||
266 | { | ||
267 | return do_fork(SIGCHLD, regs->sp, regs, 0, NULL, NULL); | ||
268 | } | ||
269 | |||
270 | /* | ||
271 | * This is trivial, and on the face of it looks like it | ||
272 | * could equally well be done in user mode. | ||
273 | * | ||
274 | * Not so, for quite unobvious reasons - register pressure. | ||
275 | * In user mode vfork() cannot have a stack frame, and if | ||
276 | * done by calling the "clone()" system call directly, you | ||
277 | * do not have enough call-clobbered registers to hold all | ||
278 | * the information you need. | ||
279 | */ | ||
280 | int sys_vfork(struct pt_regs *regs) | ||
281 | { | ||
282 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->sp, regs, 0, | ||
283 | NULL, NULL); | ||
284 | } | ||
285 | |||
286 | long | ||
287 | sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
288 | void __user *parent_tid, void __user *child_tid, struct pt_regs *regs) | ||
289 | { | ||
290 | if (!newsp) | ||
291 | newsp = regs->sp; | ||
292 | return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); | ||
293 | } | ||
294 | |||
295 | /* | 265 | /* |
296 | * Idle related variables and functions | 266 | * Idle related variables and functions |
297 | */ | 267 | */ |