[flext] CAS on ARM

Jamie Bullock jamie at jamiebullock.com
Tue Jul 1 08:40:32 UTC 2014


Hi,

I’ve been testing Flext on the Udoo platform, which is armv7l architecture.

Everything compiles fine, but Flext externals crash immediately, with the crash occurring in the CAS2() template function.

The reason seems to be the call to __sync_bool_compare_and_swap_8() 64-bit CAS function.

I can work around the issue by adding a !defined(__arm__) to the (slightly frightening!) macros in cas.hpp, so that the blocking CAS emulation gets used, i.e.

#if defined(__GNUC__) && !defined(__arm__) && ((__GNUC__ > 4) || ( (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 2) ) ) && (defined(__i686__) || defined(__pentiumpro__) || defined(__nocona__) || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))

etc

So two questions:

- Does anyone have a fix for CAS on ARM platforms?
- Does anyone know the performance implications of using blocking CAS emulation? Any profiling done?

Jamie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20140701/505dc0e6/attachment.html>


More information about the flext mailing list