tech-userlevel archive

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

Re: getcontext()/setcontext()/makecontext() reliability?

On Fri, May 04, 2012 at 02:19:49PM +0200, Joerg Sonnenberger wrote:
> On Fri, May 04, 2012 at 11:52:15AM +0000, Christos Zoulas wrote:
> > You realize {g,s}etcontext are system calls too, and they are not like the
> > old setjmp/longjmp that most of the time were implemented in userland?
> To expand a bit on this, by default, they including the signal mask and
> that requires the kernel round trip.

In sum: all the disadvantages of just using threads, none of the advantages.
For example, the standard locking primitives won't be available to you, since
if you don't link to libpthread, they'll be stubbed out in libc...


Home | Main Index | Thread Index | Old Index