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?

Re: Various bug fixes and improvements - where to put?

From: Linus Nielsen Feltzing <>
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.


Received on 2004-03-02

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy