sparc: Added function that checks if IRQ is on or off

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
This commit is contained in:
Daniel Hellstrom 2010-01-22 11:57:49 +01:00 committed by Francois Retief
parent be7357a6cc
commit f33f888d0e
2 changed files with 10 additions and 0 deletions

View file

@ -32,4 +32,7 @@ extern int intLock(void);
/* Sets the PIL to oldLevel */
extern void intUnlock(int oldLevel);
/* Return non-zero if interrupts are currently enabled */
extern int interrupt_is_enabled(void);
#endif

View file

@ -47,6 +47,13 @@ int disable_interrupts(void)
return intLock();
}
int interrupt_is_enabled(void)
{
if (get_pil() == 15)
return 0;
return 1;
}
int interrupt_init(void)
{
int ret;