Unfortunately not. This could/would (depending on the port) exit the function with interrupts disabled, leave the stack incorrect and thus not return correctly.
Also note the inline request. I assume that if the compiler does inline it, it will be fine. Maybe not though. I’m just not convinced what will happen if it doesn’t.
Basically, will the EXIT_CRITICAL bit get called, or will the compiler do what I’m telling it to, and just skip to the end of the routine ?
:
:
Okay, I think I’ve answered my question. If the compiler is more clever than I think, and fix my dumb errors, then let me know…