From af395f4db6ad7b83f9d9afefb1c0ceeedd140a45 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 26 Mar 2008 01:50:41 +0000 Subject: Do core interrupt masking in a less general fashion and save some instructions to decrease size and speed things up a little bit. Small fix to a few places where interrupts would get enabled again where they shouldn't have been (context switching calls when disabled). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16811 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/wavplay.c | 4 ++-- apps/plugins/wavrecord.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/wavplay.c b/apps/plugins/wavplay.c index 6a969f1..bf06787 100644 --- a/apps/plugins/wavplay.c +++ b/apps/plugins/wavplay.c @@ -3345,7 +3345,7 @@ void dma_end_isr(void) void demand_irq_enable(bool on) { - int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL); + int oldlevel = disable_irq_save(); if(on) { @@ -3357,7 +3357,7 @@ void demand_irq_enable(bool on) IPRA &= 0xfff0; } - set_irq_level(oldlevel); + restore_irq(oldlevel); } static inline int available(void) diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c index ee55763..b509212 100644 --- a/apps/plugins/wavrecord.c +++ b/apps/plugins/wavrecord.c @@ -3415,7 +3415,7 @@ void rec_tick(void) void rec_tick_enable(bool on) { - int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL); + int oldlevel = disable_irq_save(); if(on) { @@ -3431,7 +3431,7 @@ void rec_tick_enable(bool on) IPRB = (IPRB & 0xff0f) | 0x0080; /* Reenable IRQ6 */ } - set_irq_level(oldlevel); + restore_irq(oldlevel); } void hijack_interrupts(bool on) -- cgit v1.1