1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/pm_layered
Marian Buschsieweke 5ecafab83d
sys/pm: Correctly access pm_blocker
Replace `volatile` access to pm_blocker by guarding the accesses with
`irq_disable()` ... `irq_restore()`.

`volatile` does only guarantee that no compiler optimizations are performed on
a variable access, but does not provide atomic access. E.g. on systems with
a memory bus of less than 32 bit, the access to pm_blocker cannot be done
with a single CPU instruction. Thus, resorting to disabling IRQs is the easiest
and most portable way to actually achieve atomic access.
2020-07-15 11:21:59 +02:00
..
Makefile drivers: add layered power modes module 2017-01-12 11:24:15 +01:00
pm.c sys/pm: Correctly access pm_blocker 2020-07-15 11:21:59 +02:00