From ad464bf64a139cefa8b6f6e77b5f1f5ea1c51519 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sat, 26 Jan 2013 12:58:34 +0400 Subject: [PATCH] Prevent load_acquire redefinition in ordered_loads_only.h * src/atomic_ops/sysdeps/loadstore/ordered_loads_only.template (AO_XSIZE_load_acquire, AO_HAVE_XSIZE_load_acquire): Do not define if AO_HAVE_XSIZE_load_acquire already defined. * src/atomic_ops/sysdeps/loadstore/ordered_loads_only.h: Regenerate. --- .../sysdeps/loadstore/ordered_loads_only.h | 30 ++++++++++++------- .../loadstore/ordered_loads_only.template | 6 ++-- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/atomic_ops/sysdeps/loadstore/ordered_loads_only.h b/src/atomic_ops/sysdeps/loadstore/ordered_loads_only.h index 7852194..604738a 100644 --- a/src/atomic_ops/sysdeps/loadstore/ordered_loads_only.h +++ b/src/atomic_ops/sysdeps/loadstore/ordered_loads_only.h @@ -31,8 +31,10 @@ } # define AO_HAVE_char_load_read -# define AO_char_load_acquire(addr) AO_char_load_read(addr) -# define AO_HAVE_char_load_acquire +# ifndef AO_HAVE_char_load_acquire +# define AO_char_load_acquire(addr) AO_char_load_read(addr) +# define AO_HAVE_char_load_acquire +# endif #endif /* AO_HAVE_char_load */ /* * Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved. @@ -67,8 +69,10 @@ } # define AO_HAVE_short_load_read -# define AO_short_load_acquire(addr) AO_short_load_read(addr) -# define AO_HAVE_short_load_acquire +# ifndef AO_HAVE_short_load_acquire +# define AO_short_load_acquire(addr) AO_short_load_read(addr) +# define AO_HAVE_short_load_acquire +# endif #endif /* AO_HAVE_short_load */ /* * Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved. @@ -103,8 +107,10 @@ } # define AO_HAVE_int_load_read -# define AO_int_load_acquire(addr) AO_int_load_read(addr) -# define AO_HAVE_int_load_acquire +# ifndef AO_HAVE_int_load_acquire +# define AO_int_load_acquire(addr) AO_int_load_read(addr) +# define AO_HAVE_int_load_acquire +# endif #endif /* AO_HAVE_int_load */ /* * Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved. @@ -139,8 +145,10 @@ } # define AO_HAVE_load_read -# define AO_load_acquire(addr) AO_load_read(addr) -# define AO_HAVE_load_acquire +# ifndef AO_HAVE_load_acquire +# define AO_load_acquire(addr) AO_load_read(addr) +# define AO_HAVE_load_acquire +# endif #endif /* AO_HAVE_load */ /* * Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved. @@ -175,6 +183,8 @@ } # define AO_HAVE_double_load_read -# define AO_double_load_acquire(addr) AO_double_load_read(addr) -# define AO_HAVE_double_load_acquire +# ifndef AO_HAVE_double_load_acquire +# define AO_double_load_acquire(addr) AO_double_load_read(addr) +# define AO_HAVE_double_load_acquire +# endif #endif /* AO_HAVE_double_load */ diff --git a/src/atomic_ops/sysdeps/loadstore/ordered_loads_only.template b/src/atomic_ops/sysdeps/loadstore/ordered_loads_only.template index bc828ce..476bd8c 100644 --- a/src/atomic_ops/sysdeps/loadstore/ordered_loads_only.template +++ b/src/atomic_ops/sysdeps/loadstore/ordered_loads_only.template @@ -31,6 +31,8 @@ } # define AO_HAVE_XSIZE_load_read -# define AO_XSIZE_load_acquire(addr) AO_XSIZE_load_read(addr) -# define AO_HAVE_XSIZE_load_acquire +# ifndef AO_HAVE_XSIZE_load_acquire +# define AO_XSIZE_load_acquire(addr) AO_XSIZE_load_read(addr) +# define AO_HAVE_XSIZE_load_acquire +# endif #endif /* AO_HAVE_XSIZE_load */ -- 2.40.0