|
Boost : |
Subject: Re: [boost] [context] very brief review
From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2011-03-28 13:26:43
On Mon, Mar 28, 2011 at 6:14 PM, Phil Endecott
<spam_from_boost_dev_at_[hidden]> wrote:
> Dear All,
>
> This is a very brief note about the proposed Boost.Context that is not
> really worthy of being called a "review".
>
> My main point is that I am pleased to see this functionality being broken
> out as a separate library, rather than being hidden as a detail of a
> higher-level functionality e.g. co-routines. This is something that should
> be encouraged, and furthermore I think that the weaknesses (e.g.
> documentation) should be reviewed in the context of the alternative being to
> hide all of this inside Boost.CoRoutine and not documented at all.
>
The whole point of breaking out a functionality out of an
implementation detail is to document the interface and the semantics
:)
[...]
> It seems that the ARM code assembles to only three or four instructions for
> each function. I would have written that as inline assembler, rather than
> in a .S file.
>
This is extremely tricky: if you put your ASM as an externally
compiled function the compiler will take care of saving caller
clobbered registers before calling your ASM. Inline ASM would have to
do everything by its own, which is error prone and very fragile and
might not be fully expressible in the inline ASM syntax.
-- gpd
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk