|
Boost : |
Subject: Re: [boost] [lockfree] arm / iOS builds against Boost.Atomic
From: Tim Blechmann (tim_at_[hidden])
Date: 2013-05-15 01:48:21
>>> I noticed today when moving my work from OS X / clang / libc++ to iOS /
>>> clang / libc++ that Boost.Lockfree must link against libboost_atomic.a to
>>> compile. This shouldn't be necessary, since there is std::atomic on iOS as
>>> well.
>
> This is true if you're compiling with -std=gnu++11.
> It's possible to compile for iOS without std::atomic being available
> with gcc and clang.
>
> The point still stands though, it'd be good to use std::atomic if it's
> available.
would be great if someone who has access to the toolchain could send a
patch. the file in question is: boost/lockfree/detail/atomic.hpp
>> i don't have access to this specific toolchain, so it is probably using
>> boost::atomic instead of std::atomic ... however please note that
>> linking with boost.atomic means that the data structure that you want to
>> use is not going to be lock-free, but atomics are emulated via spin locks.
>>
>
> Why's that?
not sure if arm supports a double-width compare-and-swap or ll/sc
tim
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk