dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Various bug fixes and improvements - where to put?
From: Linus Nielsen Feltzing (
Date: 2004-03-02

[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.



Page was last modified "Jan 10 2012" The Rockbox Crew