kernel::panic_wait

Function panic_prevent_reenter

Source
fn panic_prevent_reenter()
Expand description

Stop immediately if called a second time.

ยงNote

Using atomics here relieves us from needing to use unsafe for the static variable.

On AArch64, which is the only implemented architechture at the time of writing this AtomicBool::load and AtomicBool::store are lowered to ordinary load and store instructions. They are therefore safe to use even with MMU + caching deactivated.