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

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
master
Daniel Hellstrom 15 years ago committed by Francois Retief
parent be7357a6cc
commit f33f888d0e
  1. 3
      arch/sparc/include/asm/irq.h
  2. 7
      arch/sparc/lib/interrupts.c

@ -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

@ -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;

Loading…
Cancel
Save