Alternately, one could use the GCC intrinsics. They are more conservative about memory barriers, which I believe to be more correct in any case (it is not safe to let the compiler or the instruction scheduler move memory accesses into the ldrex/strex critical region). Other than memory barrier differences, the intrinsic-based implementation should be equally fast. (Although there is no equivalent of fetchAndStore, the only actual use cases store 0, and I've special- cased that in this implementation using __sync_fetch_and_and().)
** Patch added: "Implement Qt atomics using GCC intrinsics" https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/490371/+attachment/1908862/+files/x-0003-Use-GCC-intrinsics-for-armv6-atomic-operations.patch -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to qt4-x11 in ubuntu. https://bugs.launchpad.net/bugs/490371 Title: Atomic operations not safe for ARMv7,Thumb-2 and multicore -- kubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
