lkml.org 
[lkml]   [2009]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][v6][PATCH 8/9]: Define clone_with_pids() syscall
Arnd Bergmann [arnd@arndb.de] wrote:
|
| I wonder if we can avoid spreading copies of this function across
| all architectures.
|
| Would it be possible to define it like this?

Since this is a variant of clone() and clone is listed as a PTREGSCALL(),
I pass in the pt_regs.

arch/x86/kernel/entry_32.S lists clone() under this comment:

/*
* System calls that need a pt_regs pointer.
*/

Is there a guideline on what system calls use/need pt_regs ?

Thanks,

Suakdev

|
| asmlinkage long
| clone_with_pids(int flags, unsigned long child_stack_base, int __user *parent_tid_ptr,
| int __user *child_tid_ptr, struct pid_set __user *pid_setp)
| {
| if (!child_stack_base) {
| struct pt_regs *regs;
|
| regs = task_pt_regs(current);
| child_stack_base = user_stack_pointer(regs);
| }
|
| return do_fork_with_pids(clone_flags, child_stack_base, 0,
| parent_tid_ptr, child_tid_ptr, pid_setp);
| }


\
 
 \ /
  Last update: 2009-09-10 23:27    [W:0.066 / U:4.480 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site