forked from bminor/newlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove intermediate struct for _Atomic for GCC C11
Previously, stdatomic.h always used an intermediate struct with GCC, to wrap atomic types, giving some protection against non-atomic accesses. This is unnecessary in C11. Previous commit c25de3a moved a definition of "_Atomic" into cdefs and changed the conditions such that it would not be defined in C11, but the macros in stdatomic.h still expected the intermediate struct and so dereferenced them by the "__val" member. This change adds sets of macros when C11 is in use which access _Atomic objects directly without the intermediate structs. Change-Id: Ia2b0e7bc2a1dfb02ea8af64e9e5946cfed198701
- Loading branch information
Colin McEwan
committed
Mar 22, 2024
1 parent
f638ca9
commit 6b2a582
Showing
1 changed file
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters