Right, thanks, I forgot to check boehm-gc. I believe others have
learned/borrowed from it. Will do that next week. I am running successfully on
mips64 (gdium). Had to come up with new (to me) trick for makecontext related
to register T9/$25.

 Jay/phone

> To: [email protected]
> From: [email protected]
> CC: [email protected]
> Subject: Re: get/set/make/swapcontext please?
> Date: Sat, 31 Jul 2010 14:56:59 +0100
>
> On 2010-07-26, Jay K <[email protected]> wrote:
> >                    We do need to be able to suspend/resume threads
> > and get their context while suspended. We have two ways of doing
> > this for pthreads platforms:
> >   send a signal and wait in the signal handler
> >     some use of semaphore here
> >   I think this semaphore thing runs afoul of typical usermode threading
> >   libraries, such as OpenBSD's.
> >   And apparently others e.g. FreeBSD and Darwin/MacOSX.
> >   On FreeBSD and Darwin we have custom code for suspend/resume.
> >   I think in some places it is based on the boehm gc.
>
> Is there anything in ports/devel/boehm-gc you could borrow? It does indeed
> do this type of operation and works pretty well on most arch we support
> (mips64* and the a.out arch being the notable exceptions).
>
> > Please provide get/set/make/swapcontext.
> >   (and/or kernel threads.)
>
> As far as ports are concerned, the userland threading library (especially
> changed filedescriptor semantics) is I think the area causing us the
biggest
> problems now. By contrast, though the ucontext.h functions would be nice to
> have, in the software I've ported, there's only one thing I've failed to
> port due to not having them...

Reply via email to