1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core/atomic_c11: fix I2 typedef for 16bit platforms

This commit is contained in:
Kaspar Schleiser 2020-01-31 16:24:54 +01:00
parent 26c915dcb3
commit c9883cebfd

View File

@ -48,7 +48,14 @@
/* GCC documentation refers to the types as I1, I2, I4, I8, I16 */
typedef uint8_t I1;
/* the builtins are declared with "unsigned int", but "uint16_t" is typedef'ed
* to "short unsigned int" on most platforms where "sizeof(int) == 2." */
#if __SIZEOF_INT__ == 2
typedef unsigned int I2;
#else
typedef uint16_t I2;
#endif
/* the builtins are declared with "unsigned int", but "uint32_t" is typedef'ed
* to "long unsigned int" on most platforms where "sizeof(int) == 4. */