Skip to contentSkip to conversation

fork() vs vfork()

DISCUSSION kjlin 2 participants 2 messages Sep 20, 2001 MIPS

lore
Share & tools
lore

kjlin

author
#0 lore raw

Hi all,

How does linux-mips treat the vfork() function?
I can see the fork() implemented in syscall.c as following:

save_static_function(sys_fork);
static_unused int _sys_fork(struct pt_regs regs)

{
        int res;
        res = do_fork(SIGCHLD, regs.regs[29], &regs, 0);
        return res;
}

But i can't see anything about vfork/sys_vfork in mips platform. However, the vfork() was implemented as sys_vfork in other architecture. Such as arm platform:
asmlinkage int sys_vfork(struct pt_regs *regs)

{
        return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->ARM_sp, regs, 0);
}

Why not do the same "sys_vfork" in linux-mips?
Does it mean that MIPS does not support vfork() or vfork() is equal to fork() in MIPS platform?

Thanks,
KJ

#1 lore raw
Quoted 12 lines · kjlin

From: "kjlin" <[email protected]>
To: <[email protected]>
Subject: fork() vs vfork()
Date: Thu, 20 Sep 2001 14:51:08 +0800

Hi all,

How does linux-mips treat the vfork() function?
I can see the fork() implemented in syscall.c as following:

save_static_function(sys_fork);
static_unused int _sys_fork(struct pt_regs regs)

Quoted 8 lines
{
        int res;
        res = do_fork(SIGCHLD, regs.regs[29], &regs, 0);
        return res;
}

Why not do the same "sys_vfork" in linux-mips?
Does it mean that MIPS does not support vfork() or vfork() is equal to fork() in MIPS platform?

Hint: save_static_function is a macro.

Ralf