There are two subtle wrong code bugs in the __sync_... primitives that severely affect code generation for linux. Both of these have been fixed on trunk.
http://gcc.gnu.org/ml/gcc-patches/2009-12/msg00198.html http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00600.html but need back-porting to 4.4 -- Summary: Wrong code bugs in SMP support Product: gcc Version: 4.4.3 Status: UNCONFIRMED Keywords: wrong-code Severity: major Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rearnsha at gcc dot gnu dot org GCC target triplet: arm-none-linux-gnueabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42263