Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information