Jay Cornwall ([EMAIL PROTECTED]) wrote:
> (in fact, fork() is exactly how libpthread is implemented on Linux)

Not exactly.

On linux, fork()  and pthread_create() are calls based  on a system call
named  clone().  The only  difference  is  that  for pthread  creations,
clone()  is passed  some  flags so  the  new "process"  shares the  page
tables, the file descriptors, but  use a different stack and a different
CPU context.

This was true for  <= 2.4 kernels. With 2.6, much work  has been done to
have real/compliant pthread support and i  don't know if what i told you
is still valid  with NPTL (the new pthread  implementation for linux 2.6
based systems).

-- 
Edouard Gomez


Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]

        

Reply via email to