System Calls: Handlers

EnterRtInterrupt is required at the start of a handler to set up addressing for its data area; its parameter may not be a global variable, so it must be a constant or the result of GetRtInterruptLevel.
Before an interrupt handler returns, it must call either SignalRtInterruptThread (if there is an interrupt thread, and it should be signaled) or SignalEndOfRtInterrupt (if there is no interrupt thread, or the thread does not need to be signaled).
EnableRtInterrupt and DisableRtInterrupt can be called from an interrupt handler (and from any RT thread) to enable/disable the interrupt level permanently.
Besides the functions mentioned here - and some low-level functions if knStopScheduling has been called - an interrupt handler must not call any INtime functions. In addition, an interrupt handler should not use any floating-point operations.
 
Note: Shared handlers and MSI handlers are called with the scheduler lock already applied to the running thread.
 
WARNING: Inside the handler you should NEVER use the address of an automatic variable, nor should you call a function (directly or indirectly) that uses the address of an automatic variable (because an interrupt handler runs in ring 0, the normal setup of data area and stack is different).