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

8 Commits

Author SHA1 Message Date
Martine Lenders
9b40bb63c2
core: apply uncrustify patches 2021-02-02 22:21:14 +01:00
c9883cebfd core/atomic_c11: fix I2 typedef for 16bit platforms 2020-08-05 14:32:57 +02:00
8efe5960aa core: uncrustify 2020-03-30 17:02:08 +02:00
4a31068d15 core: disable uncrustify for atomic_*.c 2020-03-30 17:00:32 +02:00
Marian Buschsieweke
7749e621b8
core: Fix undefined behaviour in C11 atomics
Casting pointers to volatile memory to pointers to regular memory is permitted,
but using those pointers to access the memory results in undefined behavior.
This commit changes the casts to no longer drop the volatile qualifier.

References: https://en.cppreference.com/w/c/language/volatile
2019-05-15 15:47:43 +02:00
be66fb0507 core/atomic_c11: fix declarations
gcc 9 started complaining about type mismatches:

1. all int sized return types are expected to be
   "unsigned int" instead of e.g., "uint32_t"

2. all arguments are expected to be passed as (volatile)
   void * pointers

This commit fixes 1. by doing ifdef'ed typedefs for I2 and I4, an fixes
2. by using void pointers, then casting within the template bodies.
2019-05-13 17:38:10 +02:00
smlng
f4d9972574 llvm: hide redefines of atomic sync operations 2017-02-14 10:53:12 +01:00
Joakim Nohlgård
fcdb157228 core: rename c11_atomic -> atomic_c11 2017-02-08 16:23:47 +01:00