about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32/bits
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-09-01 13:41:27 -0700
committerDavid S. Miller <davem@davemloft.net>2011-09-01 13:43:06 -0700
commit5f4318d102d604e2f80bc97927e2d80f76063639 (patch)
tree189e956cbde6fde7155f1961f03e8abc548c28ae /sysdeps/sparc/sparc32/bits
parent3ba575169aabc83993759305c0394f58ad1ce3e0 (diff)
downloadglibc-5f4318d102d604e2f80bc97927e2d80f76063639.tar.gz
glibc-5f4318d102d604e2f80bc97927e2d80f76063639.tar.xz
glibc-5f4318d102d604e2f80bc97927e2d80f76063639.zip
Sanitize HWCAP_SPARC_* defines/usage, and add new entries.
Diffstat (limited to 'sysdeps/sparc/sparc32/bits')
-rw-r--r--sysdeps/sparc/sparc32/bits/atomic.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/sysdeps/sparc/sparc32/bits/atomic.h b/sysdeps/sparc/sparc32/bits/atomic.h
index ef553f7270..b9b51245ff 100644
--- a/sysdeps/sparc/sparc32/bits/atomic.h
+++ b/sysdeps/sparc/sparc32/bits/atomic.h
@@ -1,5 +1,5 @@
 /* Atomic operations.  sparc32 version.
-   Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2006, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
@@ -22,6 +22,7 @@
 #define _BITS_ATOMIC_H	1
 
 #include <stdint.h>
+#include <sysdep.h>
 
 typedef int8_t atomic8_t;
 typedef uint8_t uatomic8_t;
@@ -238,13 +239,10 @@ volatile unsigned char __sparc32_atomic_locks[64]
    apps on v9 CPUs e.g. with process shared primitives, use cas insn
    on v9 CPUs and ldstub on pre-v9.  */
 
-/* Avoid <ldsodefs.h> include here.  */
 extern uint64_t _dl_hwcap __attribute__((weak));
-# define __ATOMIC_HWCAP_SPARC_V9	16
 # define __atomic_is_v9 \
   (__builtin_expect (&_dl_hwcap != 0, 1) \
-   && __builtin_expect (_dl_hwcap & __ATOMIC_HWCAP_SPARC_V9, \
-			__ATOMIC_HWCAP_SPARC_V9))
+   && __builtin_expect (_dl_hwcap & HWCAP_SPARC_V9, HWCAP_SPARC_V9))
 
 # define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
   ({								      \