1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Sevakis 2008-03-26 01:50:41 +00:00
parent 74d678fdbc
commit af395f4db6
61 changed files with 381 additions and 278 deletions

View file

@ -48,7 +48,7 @@ bool __timer_set(long cycles, bool start)
pfn_unregister = NULL;
}
oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
oldlevel = disable_irq_save();
/* Increase prescale values starting from 0 to make the cycle count fit */
while(divider>65535 && prescaler<1024)
@ -60,7 +60,7 @@ bool __timer_set(long cycles, bool start)
IO_TIMER0_TMPRSCL = prescaler;
IO_TIMER0_TMDIV = divider;
set_irq_level(oldlevel);
restore_irq(oldlevel);
return true;
}