[riot-notifications] [RIOT-OS/RIOT] sys/atomic_utils: Use volatile qualifier (#15465)
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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications