# OS_DisableInterrupts

## Syntax

  `#include <nitro/os.h>`
  `OSIntrMode OS_DisableInterrupts( void );`

## Arguments

None.

## Return Values

Returns a value that indicates the state before this function was called.

The type of the return value is `OSIntrMode` (a `u32` typedef), but the values that can be returned will be one of the `OSIntrMode_Irq` enumerated type values below.

Value | Previous state
--- | ---
OS_INTRMODE_IRQ_DISABLE | IRQ Disable (prohibited)
OS_INTRMODE_IRQ_ENABLE | IRQ Enable (permitted)

## Description

This function disables IRQ interrupts.

The master enable flag for all interrupts (the Interrupt Master Enable Flag) is what is disabled here. If IRQs are disabled with this function, no interrupts will occur even if IRQ interrupt causes are individually set to enable.

The return value indicates the state prior to calling the function.

## Internal Operation

Sets (set is disabled) the CPSR (current program status register) IRQ interrupt control bit.

## See Also

`OS_EnableInterrupts, OS_RestoreInterrupts
`

## Revision History

2005/03/08 Standardized the Japanese term for "interrupt."
2004/03/04 Changed so FIQ is not included in processing.
2004/01/14 Changed so FIQ is included in processing.
2003/12/01 Initial version.

CONFIDENTIAL