[riot-notifications] [RIOT-OS/RIOT] sys/atomic_utils: Use volatile qualifier (#15465)

Marian Buschsieweke notifications at github.com
Wed Nov 18 10:57:14 CET 2020


@maribu commented on this pull request.



> -        /* var can be register allocated, hence the memory barrier of          \
-         * irq_disable() and irq_restore() may not apply here. Using volatile  \
-         * ensures that the compiler allocates it in memory and that the       \
-         * memory access is not optimized out. */                              \
-        type result = *((const volatile type *)var);                           \

Maybe I should have done this right from the beginning just for this simplification.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15465#pullrequestreview-533276715
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201118/8d8aa1c3/attachment-0001.htm>


More information about the notifications mailing list