Boost Users :
Subject: Re: [Boost-users] [coroutine] Bus error on Mac OS X 10.5
From: Nat Goodspeed (nat_at_[hidden])
Date: 2009-04-08 23:47:38
Nat Goodspeed wrote:
> banana.cpp now runs on my Mac!
Mine -- but not all target Macs, sigh! We have to support OS X 10.4 as
well. To my distress, 10.4 does not have swapcontext() et al.
The #else clause in boost/coroutine/detail/context_posix.hpp contains
the following comment (along with an #error):
* This is just a temporary placeholder. Context swapping can
* be implemented on all most posix systems lacking *context using the
* sigaltstack+longjmp trick.
* Eventually it will be implemented, but for now just throw an error.
* Most posix systems are at least SuSv2 compliant anyway.
After a couple hours of searching, I have not yet turned up either an
article or an example of the "sigaltstack + longjmp trick." Can anyone
steer me to a reference implementation? I can't just hack something
together on my own: my boss wants me to forget about coroutines in C++,
and that would be a shame indeed. If I could adapt an implementation
that already works, though, I might still pull this off.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net