Rockbox mail archiveSubject: Re: Various bug fixes and improvements - where to put?
Re: Various bug fixes and improvements - where to put?
From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Tue, 02 Mar 2004 09:21:39 +0100
>>I don't understand what the intention in replacing cli() / sti()
>>by set_irq_level() really is. The comment says that cli() / sti()
>>are not safe.
> I didn't understand this either, and it seems I have not yet compiled this
> into the version I'm running, else I may have noticed the drag.
> They should be inline functions.
Yes, they should be inline.
The reason that cli()/sti() was unsafe is because they disregarded the
current interrupt level. The sti() function always set the interrupt
level to 0, which is a disaster if called from an interrupt, or when the
interrupt is already disabled, like when you nest the calls.
Received on 2004-03-02
Page was last modified "Sat May 23 08:12:40 2020" The Rockbox Crew