mirror of https://github.com/F-Stack/f-stack.git
Use GNUC atomics from GCC 4.9
GCC began to offer full support for the C11 standard starting with version 4.9, including support for the _Atomic keyword. https://gcc.gnu.org/gcc-4.9/changes.html
This commit is contained in:
parent
486200e57f
commit
c4dfb94e98
|
@ -264,7 +264,7 @@
|
|||
#endif
|
||||
|
||||
#if !defined(__cplusplus) && !__has_extension(c_atomic) && \
|
||||
!__has_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 7)
|
||||
!__has_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 9)
|
||||
/*
|
||||
* No native support for _Atomic(). Place object in structure to prevent
|
||||
* most forms of direct non-atomic access.
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#if defined(__clang__) && (__has_extension(c_atomic) || __has_extension(cxx_atomic))
|
||||
#define __CLANG_ATOMICS
|
||||
#elif __GNUC_PREREQ__(4, 7)
|
||||
#elif __GNUC_PREREQ__(4, 9)
|
||||
#define __GNUC_ATOMICS
|
||||
#elif defined(__GNUC__)
|
||||
#define __SYNC_ATOMICS
|
||||
|
|
Loading…
Reference in New Issue