Skip to content

increment nest counter inside critical section

Created by: paulatsense

The implementation for arch_interrupts_disable is incrementing the nest counter outside the critical section. This can lead to unexpected behavior because there is no guarantee the counter will be incremented atomically.

This change first aquires the critical section (by disabling irqs) then increments the counter thus guarantees the counter will be incremented atomically.

Merge request reports