mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
core/atomic_sync: guard by GCC >= 4.7
The documentation states that the implementation is missing for gcc < 4.7, but then unconditionally compiles it, overriding the builtins. (gcc 9 starts complaining about mismatch of declarations.)
This commit is contained in:
parent
cbc08edcd1
commit
e4fcac91a1
@ -29,7 +29,17 @@
|
||||
#include <string.h>
|
||||
#include "irq.h"
|
||||
|
||||
#if !defined(__llvm__) && !defined(__clang__)
|
||||
/* use gcc/clang implementation if available */
|
||||
#if defined(__GNUC__) \
|
||||
&& (__GNUC__ > 4 || \
|
||||
(__GNUC__ == 4 && (__GNUC_MINOR__ > 7 || \
|
||||
(__GNUC_MINOR__ == 7 && __GNUC_PATCHLEVEL__ > 0)))) \
|
||||
|| defined(__llvm__) || defined(__clang__)
|
||||
#define HAVE_C11_SYNC
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_C11_SYNC)
|
||||
|
||||
/* GCC documentation refers to the types as I1, I2, I4, I8, I16 */
|
||||
typedef uint8_t I1;
|
||||
typedef uint16_t I2;
|
||||
|
Loading…
Reference in New Issue
Block a user