This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH 1/3, MIPS] Rewrite MIPS' atomic.h to use __atomic_* builtins.
On Fri, 15 Jun 2012, Maxim Kuvyrkov wrote:
> * sysdeps/mips/bit/atomic.h [__GNUC_PREREQ (4, 8)]
Again, "bits" not "bit".
> (__arch_compare_and_exchange_bool_acq_32_int,)
No comma before the closing parenthesis on each line.
> +#if __GNUC_PREREQ (4, 8)
> +/* The __atomic_* builtins are available in GCC 4.7 and later, but MIPS
> + support for their efficient implementation was added only in GCC 4.8. */
> +
> +/* Compare and exchange.
> + For all "bool" routines, we return FALSE if exchange succesful. */
> +
> +#define __arch_compare_and_exchange_bool_acq_8_int(mem, newval, oldval) \
> + (abort (), 0)
"# define" inside #if (yes, this does mean adding spaces after the "#" for
the existing definitions that are now conditional).
> +/* This implementation using inline assembly will be removed once GLIBC
> + requires GCC 4.8 or later to build. */
glibc, not GLIBC (see
<http://sourceware.org/ml/libc-alpha/2012-05/msg01944.html>).
More review later.
--
Joseph S. Myers
joseph@codesourcery.com