tech-kern archive

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

Re: swapcontext() around pthreads



On Fri, Aug 10, 2012 at 03:00:34AM +0200, Emmanuel Dreyfus wrote:
> David Holland <dholland-tech%netbsd.org@localhost> wrote:
> 
> > Probably that the entire operating environment of B is cloned and run
> > in thread A, that is, that it's a magic implementation of threaded
> > continuations.
> 
> Right, but the question is: can we mimick the Linux behavior?

Is there a point? Our swapcontext is effectively a system call. 
If it wasn't, it is still quite expensive for a routine that supposedly
only changes %rsp followed by a call, at least for architectures that
don't use a register window algorithm.

Joerg


Home | Main Index | Thread Index | Old Index