|
From: | Markus Hitter |
Subject: | Re: [avr-libc-dev] C11 Atomics and GCC libatomic |
Date: | Fri, 24 Jun 2016 18:02:34 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
Am 24.06.2016 um 16:21 schrieb Jacob Moroni:
With this library, I was also able to include a portable version of the <stdatomic.h> header which allows for the successful use of C11 atomic types! I would like to get this merged into avr-libc
What's wrong with the atomic macros already existing? http://www.nongnu.org/avr-libc/user-manual/atomic_8h.htmlA function call is rather heavyweight for something as simple as locking interrupts.
As the above macros require C99, Teacup Firmware created a similar macro set working on C89, too:
https://github.com/Traumflug/Teacup_Firmware/blob/master/memory_barrier.h Markus -- - - - - - - - - - - - - - - - - - - - Dipl. Ing. (FH) Markus Hitter http://www.jump-ing.de/
[Prev in Thread] | Current Thread | [Next in Thread] |