summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/system-jz4740.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-12-03 00:20:24 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-12-03 00:20:24 +0000
commit815998c6693998b7d7a3a523058ff0988e735d27 (patch)
tree1ad06d79a90b946362f79d5c73dbe77d8f101ba4 /firmware/target/mips/ingenic_jz47xx/system-jz4740.c
parent0e97b1a1ebf205f33e80266f06d75bf71aa73de7 (diff)
downloadrockbox-815998c6693998b7d7a3a523058ff0988e735d27.tar.gz
rockbox-815998c6693998b7d7a3a523058ff0988e735d27.tar.bz2
rockbox-815998c6693998b7d7a3a523058ff0988e735d27.zip
Jz4740 targets: make sure you don't yield when in interrupt mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19309 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/system-jz4740.c')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/system-jz4740.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/system-jz4740.c b/firmware/target/mips/ingenic_jz47xx/system-jz4740.c
index 89011e1baf..10741024a9 100644
--- a/firmware/target/mips/ingenic_jz47xx/system-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/system-jz4740.c
@@ -322,6 +322,13 @@ static int get_irq_number(void)
return irq;
}
+static bool intr_mode = false;
+
+bool in_interrupt_mode(void)
+{
+ return intr_mode;
+}
+
void intr_handler(void)
{
int irq = get_irq_number();
@@ -330,7 +337,11 @@ void intr_handler(void)
ack_irq(irq);
if(irq > 0)
+ {
+ intr_mode = true;
irqvector[irq-1]();
+ intr_mode = false;
+ }
}
#define EXC(x,y) if(_cause == (x)) return (y);