how to determine whether in irq context
Dear all: i remember there is a marco for us to determine whether we are located in irq context. I forget what it is. Would anyone know what it is? -- Thanks for your help
On Wed, Dec 28, 2011 at 10:20 AM, loody <miloody@gmail.com> wrote:
Dear all: i remember there is a marco for us to determine whether we are located in irq context. I forget what it is. Would anyone know what it is?
-- Thanks for your help Hi, This is copy/paste from <linux/hardirq.h>:
/* * Are we doing bottom half or hardware interrupt processing? * Are we in a softirq context? Interrupt context? * in_softirq - Are we currently processing softirq or have bh disabled? * in_serving_softirq - Are we currently processing softirq? */ #define in_irq() (hardirq_count()) #define in_softirq() (softirq_count()) #define in_interrupt() (irq_count()) #define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET) Regards, Bojan
hi bojan: 2011/12/28 bojan prtvar <prtvar.b@gmail.com>:
On Wed, Dec 28, 2011 at 10:20 AM, loody <miloody@gmail.com> wrote:
Dear all: i remember there is a marco for us to determine whether we are located in irq context. I forget what it is. Would anyone know what it is?
-- Thanks for your help,
participants (2)
-
bojan prtvar -
loody