# OS_CheckIrqStack

## C Specification

      #include <nitro/os.h>

      void OS_CheckIrqStack( void );

## Arguments

None.

## Return Values

None.

## Description

Check if the stack used for IRQ mode has overflowed.

This function checks the magic number written in the stack's highest and lowest locations (and, if set, the warning level location set by the user) to see if they have been rewritten (if the section has been used one or more times). If it has been used, `OS_Panic()` will be called and the program will stop.

Since the magic number is written by `OS_SetIrqStackChecker()`, this function must be called afterward. Since `OS_SetIrqStackChecker()` is called from inside `OS_Init()`, this function must be called after `OS_Init()`.

This function is for debugging, so it will not effect the FINALROM.

## See Also

`OS_SetIrqStackWarningOffset, OS_GetIrqStackStatus, OS_SetIrqStackChecker
`

## Revision History

07/19/2005 Initial version.