On 2010-07-26, Jay K <jay.kr...@cornell.edu> 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