[riot-notifications] [RIOT-OS/RIOT] cpu/cortexm_common: replace irq_restore by __set_PRIMASK for stm32l152re (#11919)

Marian Buschsieweke notifications at github.com
Fri Jul 26 08:47:56 CEST 2019

I'd expect that `irq_restore()`, `irq_disable()` and `irq_enable()` will be functions with a single machine instruction (not taking calling convention boilerplate into account) on all platforms. E.g. if disabling IRQs would be two instructions, an interrupt could occur between those two. I bet, that no architecture wants this.

With that in mind: Wouldn't it be much better to have `irq_restore()`, `irq_disable()` and `irq_enable()` as header only functions that are always inlined? That would get rid of the caller convention boiler plate (and likely safe a few bytes of ROM that way), have less runtime overhead and - as a nice side effect - would solve the issue here without having to handle the stm32l152re differently than the other CPUs.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190725/e4eb7d8a/attachment.htm>

More information about the notifications mailing list