Replacement for AVR libc ATOMIC_BLOCK macros, now for DUE and other platforms.