Function RTSaveAndDisableInterrupts

This function disables interrupts and returns the previous interrupt state. This value can later be passed to function RTRestoreInterrupts to restore the interrupt state (interrupts enabled or disabled).

DWORD RTSaveAndDisableInterrupts(void);

Please note that disableing interrupts does not prevent interrupt handlers to be executed in a multiprocessor environment. Spinlocks are required to implement mutual exclusion with ISRs.