##### Synopsis

    #include <inmaxq.h>
    unsigned __disable_interrupt(void);

##### Description

__disable_interrupt disables global interrupts by clearing the IGE bit in the interrupt control register IC and returns the value of the interrupt control register before the IGE bit is cleared. You can restore the state of the IGE bit from the value returned from __disable_interrupt by using the __restore_interrupt intrinsic function.

__disable_interrupt is an intrinsic function and produces inline code.

##### Example

    void critical_function(void)
    {
      // Disable interrupts and save interrupt enable state
      unsigned char state = __disable_interrupt();

      // Critical processing here

      // Restore interrupt enable state from saved value
      __restore_interrupt(state);
    }

##### Portability

__disable_interrupt can be used on any MAXQ device.

##### See Also

__restore_interrupt