pub fn current_runlevel() -> Priority {
        let prev_interrupt_priority = PLIC_MX::regs()
            .mxint_thresh()
            .read()
            .cpu_mxint_thresh()
            .bits()
            .saturating_sub(1);

        unwrap!(Priority::try_from(prev_interrupt_priority))
    }
Get the current run level (the level below which interrupts are masked).
esp-hal/src/interrupt/riscv.rs