#define ENTER_CRITICAL( ) __asm__ __volatile__ ( \ "in __tmp_reg__, __SREG__" "\n\t" \ "cli" "\n\t" \ "push __tmp_reg__" "\n\t" \ ::: "memory" \ )
Enter a critical region.
Saves the contents of the status register, including the Global Interupt Enable bit, so that it can be restored upon leaving the critical region. Therafter, clears the Global Interrupt Enable Bit. This macro takes a parameter P that is unused for the GCC compiler, but necessary for code compatibility with the IAR compiler. The IAR compiler declares a variable with the name of the parameter for holding the SREG value. Since a variable is declared in the macro, this variable must have a name that is unique within the scope that the critical region is declared within, otherwise compilation will fail.
Name of variable storing SREG