[atomic] atomic<int>::is_lock_free() returns false on iPad 4 (armv7s)

Hi, boost:atomic<int>::is_lock_free() returns false on iPad 4 (armv7s) but returns true on iPad 3 (armv7). Is this expected or did I build boost incorrectly? thanks! - Taylor W. Taylor Holliday, Owner/Founder Subatomic Software, San Francisco

On Thursday 05 September 2013 18:07:27 Taylor Holliday wrote:
Hi,
boost:atomic<int>::is_lock_free() returns false on iPad 4 (armv7s) but returns true on iPad 3 (armv7). Is this expected or did I build boost incorrectly?
Most of Boost.Atomic code is header-only, so the problem is not related to building Boost. I suppose, noone added detection for the armv7s target because noone knows how to detect it at compile time. If you could provide a compiler predefined macro that can be used for this purpose, we could add the support.

boost:atomic<int>::is_lock_free() returns false on iPad 4 (armv7s) but returns true on iPad 3 (armv7). Is this expected or did I build boost incorrectly?
Most of Boost.Atomic code is header-only, so the problem is not related to building Boost.
I suppose, noone added detection for the armv7s target because noone knows how to detect it at compile time. If you could provide a compiler predefined macro that can be used for this purpose, we could add the support.
my experience with arm is rather limited (ccing phil, who wrote the arm-part), just two points: * if armv7s is similar to armv7, it may be safe to adapt atomic/detail/platform.hpp with __ARM_ARCH_7S__ * the boost.atomic part for armv7 currently does not support double-width compare_exchange, although the hardware provides these instructions. btw, it may be worth to note that on iOS devices std::atomic should be available ... tim

On Friday 06 September 2013 09:20:16 Tim Blechmann wrote:
boost:atomic<int>::is_lock_free() returns false on iPad 4 (armv7s) but
returns true on iPad 3 (armv7). Is this expected or did I build boost incorrectly?
Most of Boost.Atomic code is header-only, so the problem is not related to building Boost.
I suppose, noone added detection for the armv7s target because noone knows how to detect it at compile time. If you could provide a compiler predefined macro that can be used for this purpose, we could add the support.
my experience with arm is rather limited (ccing phil, who wrote the arm-part), just two points:
* if armv7s is similar to armv7, it may be safe to adapt atomic/detail/platform.hpp with __ARM_ARCH_7S__
I've found that this (and quite a few other) macros are used in boost/smart_ptr/detail/spinlock_gcc_arm.hpp, so I've updated Boost.Atomic to use them as well. It would be great if anyone could test the updated version for the actual ARM target.
participants (3)
-
Andrey Semashev
-
Taylor Holliday
-
Tim Blechmann