Skip to contentSkip to conversation

shirq correction

PATCH Applied Dmitry Adamushko 2 participants 2 messages Mar 11, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 shirq correction

Hello,

I overlooked that the logic of decrementing the interrupt nesting count has been changed recently and
both xnintr_shirq_handler() and xnintr_edge_shirq_handler() behave wrong in this respect.

The attached patch fixes this misbehavior.

--
Best regards,
Dmitry Adamushko

intr.c renamed from intr.c-old +2 -6
@@ -493,14 +493,12 @@ static void xnintr_shirq_handler (unsign
         }
     xnintr_shirq_unlock(shirq);
 
-    --sched->inesting;
-
     if (s & XN_ISR_PROPAGATE)
 	xnarch_chain_irq(irq);
     else if (!(s & XN_ISR_NOENABLE))
 	xnarch_end_irq(irq);
 
-    if (sched->inesting == 0 && xnsched_resched_p())
+    if (--sched->inesting == 0 && xnsched_resched_p())
 	xnpod_schedule();
 
     xnltt_log_event(xeno_ev_iexit,irq);
@@ -557,8 +555,6 @@ static void xnintr_edge_shirq_handler (u
 
     xnintr_shirq_unlock(shirq);
 
-    --sched->inesting;
-
     if (counter > MAX_EDGEIRQ_COUNTER)
 	xnlogerr("xnintr_edge_shirq_handler() : failed to get the IRQ%d line free.\n", irq);
 
@@ -567,7 +563,7 @@ static void xnintr_edge_shirq_handler (u
     else if (!(s & XN_ISR_NOENABLE))
 	xnarch_end_irq(irq);
 
-    if (sched->inesting == 0 && xnsched_resched_p())
+    if (--sched->inesting == 0 && xnsched_resched_p())
 	xnpod_schedule();
 
     xnltt_log_event(xeno_ev_iexit,irq);
#1 lore raw
Quoted 8 lines · Dmitry Adamushko

Hello,

I overlooked that the logic of decrementing the interrupt nesting count has been changed recently and both xnintr_shirq_handler() and xnintr_edge_shirq_handler() behave wrong in this respect.

The attached patch fixes this misbehavior.

Applied, thanks.

Quoted 4 lines
Signature · 2 lines
Best regards,
Dmitry Adamushko
Signature · 1 line
Philippe.