[Buildroot] [PATCH 4/5] libglib2: define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Fri Jul 20 21:39:12 UTC 2012
Le Wed, 18 Jul 2012 23:17:39 +0200,
Sven Neumann <s.neumann at raumfeld.com> a écrit :
> On ARMv5 atomic operations are not actually available as inlines
> but libgcc does still provide them as functions. Trick glib into
> using the functions instead of using the mutex-based fallbacks.
>
> This should probably be platform-dependant. The inline functions
> are available for ARMv6 and above and probably for other platforms
> as well. Please advice on how to fix this properly.
>
> Without this change performance of atomic operations is horrible
> on ARMv5 systems.
>
> Signed-off-by: Sven Neumann <s.neumann at raumfeld.com>
But isn't the compiler supposed to define
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 by itself?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
More information about the buildroot
mailing list