|
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 [IDC]Dragon wrote: >>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. Linus _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockbox Received on 2004-03-02 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |