Messages in this thread | | | Date | Wed, 4 Dec 2002 17:08:55 +0100 (CET) | From | "davide.rossetti" <> | Subject | Re: 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/
| |