[riot-notifications] [RIOT-OS/RIOT] core: fix c11 atomic definitions (fix gcc9 compilation) (#11514)
notifications at github.com
Wed May 15 13:54:19 CEST 2019
> Any attempt to read or write to an object whose type is volatile-qualified through a non-volatile lvalue results in undefined behavior
You are right. Also, this discussion was opened on devel mailinglist before in "[riot-devel] sched_active_thread is a volatile pointer, but volatile is ignored".
I've read some opinions online and found that locking the functions via disabling interrupts should be enough to achieve atomicity. Thus from my understanding volatile should rather be removed, to avoid undefined behavior. But as Kaspar said, it should not break anything (at least now).
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications