[PATCH] Switch leds from mutex to spinlock to work in atomic contexts

Holger Freyther zecke at openmoko.org
Mon Jul 7 17:15:25 CEST 2008

On Monday 07 July 2008 14:57:13 Werner Almesberger wrote:
> Holger Freyther wrote:
> > Switch from using a mutex to spinlock
> > to control the brightnes of the leds...
> This is bogus. Spinlocks don't do anything on a uniprocessor - they're
> even removed during compilation.

hmm, I assumed that spin_lock_irqsave would still disable the interrupt on the 
current (only) cpu. let me open Documentation/spinlocks.txt again.

> Here are some choices of what you can do if you need to lock something
> that can be called from an interrupt:

I will look into these options.


More information about the openmoko-kernel mailing list