Rockbox mail archive
Subject: Re: Various bug fixes and improvements - where to put?
From: Linus Nielsen Feltzing (linus_at_haxx.se)
Jens Arnold wrote:
> If you want to allow yield() from within "interupt disabled"
> blocks, we would need cli() and sti() functions that preserve a
> "nesting count", i.e. cli() disables interrupts (always) and
> increments this count, sti() decrements this count and enables
> interrupts _only_ if the nesting count reaches zero.
First of all, we have no intention of allowing yield() within an
interrupt disabled block. Secondly, if you implement this nesting
mechanism, you will have about the same overhead as the set_irq_level()
function, and you just complained about its inefficiency.
And you still need to take the current level into account in the
cli()/sti() functions, since you may be calling it from an interrupt
Page was last modified "Jan 10 2012" The Rockbox Crew