[flext] CAS on ARM

Thomas Grill gr at grrrr.org
Tue Jul 1 08:59:33 UTC 2014


Hi Jamie,
i (or anyone) should probably look into boost_atomic to fix this. Another option would be to make this library a dependency or fully include its source.
As for the stalls caused by blocking CAS: It depends entirely on the duration of the individual threads or whether they can yield execution while running.
gr~~~

Am 01.07.2014 um 10:40 schrieb Jamie Bullock <jamie at jamiebullock.com>:

> 
> 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
> 
> _______________________________________________
> http://grrrr.org/ext/flext
> 
> flext mailing list
> flext at grrrr.org
> http://grrrr.org/cgi-bin/mailman/listinfo/flext

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20140701/58cc388f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://grrrr.org/pipermail/flext/attachments/20140701/58cc388f/attachment.sig>


More information about the flext mailing list