tech-userlevel archive

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

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

On Thu, 3 May 2012 12:59:45 -0500
David Young <> wrote:

> Are getcontext()/setcontext()/makecontext() known to work reliably on
> NetBSD?  It looks to me like they are used in NetBSD/usermode and in
> puffs, and there are tests exercising them, so I hoep that the answer is
> "yes!"

I can't confirm that it's still the case, but there's a CAVEATS section:

     Due to limitations in the current pthread implementation, makecontext
     should not be used in programs which link against the pthread(3) library
     (whether threads are used or not).

Otherwise, if those don't work well, it's a bug :)

Another user that I know of is the pth library, which is used by
gnupg2.  Pth supports various context switch methods, but I can see
with nm(1) on NetBSD-6/amd64 that makecontext(3) and friends were

Home | Main Index | Thread Index | Old Index