[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q about do_fork()



On Fri, 6 Apr 2001, petur thors wrote:

> Hi
> I was wondering. If you are on an SMP machine and two diffirent processes do
> a fork() or a clone() system call at the same time, can the corresponding
> kernel control paths enter the do_fork fuction in kernel/fork.c at the same
> time or is one locked out while the other does his thing. I would be very
> happy if someone could give me a hint.
> Many, many thanks.

I can't see any locks around do_fork(). You can look yourself, in the file arch/i386/process.c

I also can't see (looking quickly) any problem with the routine being multi-threaded

john

-- 
"I am a conscientious man, when I throw rocks at seabirds I leave no tern
unstoned."
   - Ogden Nash

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/