Request for swapcontext and getcontext to be ported to our libc

Matt Emmerton matt at
Fri Jan 12 16:49:35 PST 2007

Simon wrote:
> Matt Emmerton wrote:
> > I've toyed with it a bit, but there are some issues I'm not sure how to
> > solve (such as accessing curthread -- a kernel construct -- from
> > I would welcome discussion with the person who suggested it (corecode?).
> In which way do you have to access curthread?  That's a kernel-only
> entity, I don't think you have to access that in userland.  Besides, if we
> take in the system call version, there is no need for a pure libc based
> version anymore.

Point taken, and that's definitely the path we're going down at the moment.

However, I recall it being mentioned that the proliferation of syscalls is
unneccessary, so a libc implementation would keep the kernel lean.  The
reason we need curthread is to get access to the frame construct, which is
neccessary to save the context.

Matt Emmerton

More information about the Users mailing list