diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-14 18:56:10 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-14 18:56:10 +0000 |
commit | aedd2947e223fda8838a2d2d9e7a4dc9327d8855 (patch) | |
tree | f1cd78706b1222ecae5a2345776b12d88e3644d8 /gcc/ginclude | |
parent | f0c4b2a7f5b599a00205a7c2491d67c9511e3f79 (diff) | |
download | gcc-aedd2947e223fda8838a2d2d9e7a4dc9327d8855.tar.gz |
DR 458
* ginclude/stdatomic.h (__atomic_type_lock_free): Remove.
(ATOMIC_*_LOCK_FREE): Map to __GCC_ATOMIC_*_LOCK_FREE.
* gcc.dg/c11-stdatomic-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213981 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ginclude')
-rw-r--r-- | gcc/ginclude/stdatomic.h | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/gcc/ginclude/stdatomic.h b/gcc/ginclude/stdatomic.h index 108259b4eab..26b4b6e53de 100644 --- a/gcc/ginclude/stdatomic.h +++ b/gcc/ginclude/stdatomic.h @@ -95,30 +95,16 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; #define atomic_signal_fence(MO) __atomic_signal_fence (MO) #define atomic_is_lock_free(OBJ) __atomic_is_lock_free (sizeof (*(OBJ)), (OBJ)) -#define __atomic_type_lock_free(T) \ - (__atomic_always_lock_free (sizeof (T), (void *) 0) \ - ? 2 \ - : (__atomic_is_lock_free (sizeof (T), (void *) 0) ? 1 : 0)) -#define ATOMIC_BOOL_LOCK_FREE \ - __atomic_type_lock_free (atomic_bool) -#define ATOMIC_CHAR_LOCK_FREE \ - __atomic_type_lock_free (atomic_char) -#define ATOMIC_CHAR16_T_LOCK_FREE \ - __atomic_type_lock_free (atomic_char16_t) -#define ATOMIC_CHAR32_T_LOCK_FREE \ - __atomic_type_lock_free (atomic_char32_t) -#define ATOMIC_WCHAR_T_LOCK_FREE \ - __atomic_type_lock_free (atomic_wchar_t) -#define ATOMIC_SHORT_LOCK_FREE \ - __atomic_type_lock_free (atomic_short) -#define ATOMIC_INT_LOCK_FREE \ - __atomic_type_lock_free (atomic_int) -#define ATOMIC_LONG_LOCK_FREE \ - __atomic_type_lock_free (atomic_long) -#define ATOMIC_LLONG_LOCK_FREE \ - __atomic_type_lock_free (atomic_llong) -#define ATOMIC_POINTER_LOCK_FREE \ - __atomic_type_lock_free (void * _Atomic) +#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE +#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE +#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE +#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE +#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE +#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE +#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE +#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE +#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE +#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE /* Note that these macros require __typeof__ and __auto_type to remove |