summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/system-target.h
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-12-04 21:06:52 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-12-04 21:06:52 +0000
commit203722136c5f50d7deab432739e991faa48e470f (patch)
tree5e4b9fa829859e53a05f051ebb1112d91da0538d /firmware/target/mips/ingenic_jz47xx/system-target.h
parent1ab08e6879b1fe50102fe68a1326db05891e6faa (diff)
downloadrockbox-203722136c5f50d7deab432739e991faa48e470f.tar.gz
rockbox-203722136c5f50d7deab432739e991faa48e470f.tar.bz2
rockbox-203722136c5f50d7deab432739e991faa48e470f.zip
Implement in_interrupt_mode() properly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19334 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/system-target.h')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/system-target.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/system-target.h b/firmware/target/mips/ingenic_jz47xx/system-target.h
index a8133140fa..eab517fa5d 100644
--- a/firmware/target/mips/ingenic_jz47xx/system-target.h
+++ b/firmware/target/mips/ingenic_jz47xx/system-target.h
@@ -56,6 +56,11 @@ static inline void disable_interrupt(void)
clear_c0_status(ST0_IE);
}
+static inline bool in_interrupt_mode(void)
+{
+ return (read_c0_status() & ST0_IE) ? true : false;
+}
+
#define disable_irq() \
disable_interrupt()
@@ -101,7 +106,6 @@ void udelay(unsigned int usec);
void mdelay(unsigned int msec);
void power_off(void);
void system_reboot(void);
-bool in_interrupt_mode(void);
#define DMA_LCD_CHANNEL 0
#define DMA_NAND_CHANNEL 1