Subject: [boost] [context] for Mac OS X (and other platforms) via libtask
From: Daniel Larimer (dlarimer_at_[hidden])
Date: 2011-02-06 09:14:30
I have put some code up on github that uses libtask's implementation of asm based context switching as a backend implementation of boost::context. I have verified that it allows me to use Boost.Fiber on Mac OS X. I suspect that my changes would allow Boost.Context to work with arm, power pc, and any other platform supported by libtask.
The protected_stack allocator does not seem to work on OS X, so I switched to using malloc/free. I wonder if this is the reason why the ucontext implementation was not working on OS X either. Considering ucontext on Mac OS X is deprecated and asm 100x faster, I am not sure it is worth while to get the ucontext implementation working.
I suspect that the correct solution would be to modify the code in libs/context/src/libtask to implement the fcontext pattern, but I have no experience with asm.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk