[riot-notifications] [RIOT-OS/RIOT] cpu/cortexm_common: add inlined header only def for irq_% (#13999)
notifications at github.com
Fri May 1 09:45:35 CEST 2020
This is something I have wanted to see for a long time :-)
It is good to do this one arch at a time. I would also like to see the return value to be lets call it `uword_t` or `irq_state_t`, which is 32 bit wide on a 32 bit system, 16 bit on a 16 bit system, and 8 bit wide on a 8 bit platform.
Every platform I am aware of guarantees to disable and restore IRQs in one CPU cycle. As at most a word can be read/written in a cycle, this gives us the word as upper limit for the IRQ state.
The AVR platform would greatly profit if it would be both `inline`d and word sized, as than the call `irq_disable()` would translate to one instruction.
(But changing the return type is something that deserves its own PR. Especially as a lot of callers have to be updated.)
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...
More information about the notifications