mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 08:38:24 +08:00
genirq: Minor readablity improvement in irq_wake_thread()
exit_irq_thread() clears IRQTF_RUNTHREAD flag and drops the thread's bit in desc->threads_oneshot then. The bit must not be set again in between and it does not, since irq_wake_thread() sees PF_EXITING flag first and returns. Due to above the order or checking PF_EXITING and IRQTF_RUNTHREAD flags in irq_wake_thread() is important. This change just makes it more visible in the source code. Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Link: http://lkml.kernel.org/r/20120321162212.GO24806@dhcp-26-207.brq.redhat.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
b5174fa3a7
commit
69592db298
@ -54,14 +54,18 @@ static void warn_no_thread(unsigned int irq, struct irqaction *action)
|
||||
static void irq_wake_thread(struct irq_desc *desc, struct irqaction *action)
|
||||
{
|
||||
/*
|
||||
* Wake up the handler thread for this action. In case the
|
||||
* thread crashed and was killed we just pretend that we
|
||||
* handled the interrupt. The hardirq handler has disabled the
|
||||
* device interrupt, so no irq storm is lurking. If the
|
||||
* In case the thread crashed and was killed we just pretend that
|
||||
* we handled the interrupt. The hardirq handler has disabled the
|
||||
* device interrupt, so no irq storm is lurking.
|
||||
*/
|
||||
if (action->thread->flags & PF_EXITING)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Wake up the handler thread for this action. If the
|
||||
* RUNTHREAD bit is already set, nothing to do.
|
||||
*/
|
||||
if ((action->thread->flags & PF_EXITING) ||
|
||||
test_and_set_bit(IRQTF_RUNTHREAD, &action->thread_flags))
|
||||
if (test_and_set_bit(IRQTF_RUNTHREAD, &action->thread_flags))
|
||||
return;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user