Boost logo

Boost :

Subject: Re: [boost] [Boost-users] [context review] Review starts today, Mars 21st 2011
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2011-03-24 08:36:42


> This confuses me.
>
> I do understand that a default-constructed *context* object is useful
> to be able to switch context from any place in the code.
>
> But I'm now asking about the usefulness of a default-constructed
> *stack* object. A default-constructed *context* object is not passed a
> stack object.

because og the move-semantics supported by the stack class an default constructed stack instance means not-a-stack. It doesn't allocates memory.

> If you're saying that a default-constructed context object must
> nonetheless store a default-constructed stack object... this starts to
> feel like an implementation detail leaking out into the API.

It is not leaking - all classes providing move-semantics are used in this ways. Please look into boost.thread - boost::thread has a default ctor -> constructs a boost::thread instance that refers to Not-a-Thread.
 

> In that case, what further Context work is needed to support Mac OS X?

assembler implementation/fcontext - the source code has already an assembler file for MAC OS X (x86-64/i386). I wasn't able to test the code because I haven't a MAC OS X installation.

Oliver

-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone

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