lkml.org 
[lkml]   [2002]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: in_irq()
On Tue, 3 Dec 2002, Madhavi wrote:

>
> Hi
>
> I am using a UP system with CONFIG_SMP=y in .config with linux 2.4.19
> kernel.
>
> I have this piece of code:
>
> spin_lock_irqsave(&some_lock, flags);
> in_irq();
> spin_unlock_irqrestore(&some_lock, flags);
>
> I have read somewhere (I think its given in the Unreliable Guide to
> kernel locking) that in_irq() returns true when the interrupts
> are blocked. So, I was expecting in_irq() to return true here. But, it is
> returning 0 here.

I think it is intended to return true only if you are in an interrupt
context.... that is in the context of a iterrupt handler...

ciao


--
______/ Rossetti Davide INFN - Roma I - APE group \______________
pho +390649914507/412 web: http://apegate.roma1.infn.it/~rossetti
fax +390649914423 email: davide.rossetti@roma1.infn.it


-
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: 2005-03-22 13:31    [W:0.037 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site