Boost logo

Boost :

Subject: Re: [boost] [context] for Mac OS X (and other platforms) via libtask
From: Edd Dawson (lists_at_[hidden])
Date: 2011-02-06 13:21:58


On 2/6/2011 2:14 PM, Daniel Larimer wrote:
> 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.
>
> https://github.com/bytemaster/boost_context_osx/tree/master/libs/context/src

Hi Daniel,

Did you see the response I posted in your other recent thread on this topic?

http://lists.boost.org/Archives/boost/2011/01/176236.php

It might fix the problems you're seeing on OS X without introducing the libtask
dependency. Apologies for the noise if you've already seen/tried this.

Cheers,

Edd


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk