lkml.org 
[lkml]   [2006]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 08/19] mutex subsystem, core


On Tue, 3 Jan 2006, Ingo Molnar wrote:
> >
> > Is this an interrupt deadlock, or do you not allow interrupt contexts
> > to even trylock a mutex?
>
> correct, no irq contexts are allowed. This is also checked for if
> CONFIG_DEBUG_MUTEXES is enabled.

Note that semaphores are definitely used from interrupt context, and as
such you can't replace them with mutexes if you do this.

The prime example is the console semaphore. See kernel/printk.c, look for
"down_trylock()", and realize that they are all about interrupts.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.049 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site