I have a device that takes in multiple interrupts from external devices and ultimately sends one interrupt signal to the ARM processor. What I have done is written a driver containing an ISR registered with the OS.
The job of the ISR is to inspect the registers to find out which external device is firing off the interrupt and then take some appropriate action before clearing the external interrupt with a register write.
One of the things that I noticed is that my RTOS provides the ability to lock and unlock all interrupts for the CPU, but all that the documentation really says is to use it sparingly.
Would it be ok to use something like that in my use case? Or is that frowned upon? What I’m envisioning is a critical region within an ISR where I read the external interrupt, pass it along, and clear it, before unlocking the interrupts for the CPU. The reason I want to do this is to prevent any sort of potential preemption even though I haven’t run into any issues yet.