lib: os: poweroff: Disable ZLIs before poweroff

We currently only disable "normal" IRQs with irq_lock(). This is not
sufficient if ZLIs are enabled, as even though they are supposed to
be "above" the kernel, they must not interrupt the poweroff procedure.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
This commit is contained in:
Bjarki Arge Andreasen
2025-12-10 19:56:52 +01:00
committed by Fabio Baltieri
parent 7c72e3cc42
commit 66dbe436bd

View File

@@ -10,5 +10,9 @@ void sys_poweroff(void)
{
(void)irq_lock();
#if defined(CONFIG_ZERO_LATENCY_IRQS)
(void)arch_zli_lock();
#endif /* CONFIG_ZERO_LATENCY_IRQS */
z_sys_poweroff();
}