Subject: Re: [boost] [context] for Mac OS X (and other platforms) via libtask
From: Daniel Larimer (dlarimer_at_[hidden])
Date: 2011-02-06 11:07:43
On Feb 6, 2011, at 9:55 AM, Oliver Kowalke wrote:
> Am 06.02.2011 15:14, schrieb Daniel Larimer:
>> 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.
> Mac OS X uses the SYSV ABI - the problem is the MACH-O binary format which I've to address if the lib is build upon PIC.
> Do you test on i386 or x86_64?
I am using a MacBook Pro running 10.6.6 and compiled for x86_64, but libtask runs on both i386 and x86_64 as well as PowerPC and I did not modify the context code from libtask, I simply called it from boost::context::impl_t.
Assuming a 3rd party library has a boost compatible license, are there any problems integrating source from a 3rd party library in a boost library submission?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk