2001-12-28 05:48:33

by isp01ljl

[permalink] [raw]
Subject: whether the thread is implemented in the kernel ?

Hello all ,

I encountered a interesting problem , that is whether the thread
is implemented in the kernel ? if yes , then what is the system
call to generate a thread ? is it similar to fork() ?

thanks ...

happy new year !

--
Best regards,
LucidaS mailto:[email protected]


2001-12-28 12:41:15

by Rik van Riel

[permalink] [raw]
Subject: Re: whether the thread is implemented in the kernel ?

On Thu, 28 Dec 2000 [email protected] wrote:

> I encountered a interesting problem , that is whether the thread
> is implemented in the kernel ? if yes , then what is the system
> call to generate a thread ? is it similar to fork() ?

clone(2), which is the exact same code path as fork().

For more information, see
man 2 clone
kernel/fork.c::do_fork()

regards,

Rik
--
Shortwave goes a long way: irc.starchat.net #swl

http://www.surriel.com/ http://distro.conectiva.com/