|
Boost : |
Subject: Re: [boost] [atomic] Support for specialized instructions
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-11-23 10:08:37
On Saturday 23 November 2013 12:37:43 tim wrote:
>
> >> bts/btr may be
> >> useful, but i suppose they are rather specific to x86? i wonder, how
> >> would they map to arm?
> >
> > AFAIK, ARM implements atomic ops with LL/SC instructions, so it should
> > be flexible enough to implement it. I'm not very familiar with the
> > architecture though.
>
> true ... though i'm not sure how well it performs: it emulates cas with
> ll/sc and atomic ops with cas ... but true, this is another issue and
> one of the reasons why i always suggest to use std::atomic if possible ...
Yes, that's worth fixing too. PowerPC also implements LL/SC model and it has
the complete implementation in Boost.Atomic. We'll need to do the same for
ARM.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk