All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH] shirq correction
@ 2006-03-11 10:44 Dmitry Adamushko
  2006-03-11 11:47 ` [Xenomai-core] " Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Adamushko @ 2006-03-11 10:44 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 291 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 350 bytes --]

[-- Attachment #2: intr.c.patch --]
[-- Type: application/octet-stream, Size: 1075 bytes --]

--- intr.c-old	2006-03-10 11:07:42.000000000 +0100
+++ intr.c	2006-03-10 11:08:47.000000000 +0100
@@ -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);

[-- Attachment #3: ChangeLog --]
[-- Type: application/octet-stream, Size: 220 bytes --]


2006-03-10  Dmitry Adamushko <dmitry.adamushko@domain.hid>

	* ksrc/nucleus/intr.c (xnintr_shirq_handler, xintr_edge_shirq_handler):
	Decrement the interrupt nesting count the same way as xnintr_irq_handler()
	does it.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-11 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-11 10:44 [Xenomai-core] [PATCH] shirq correction Dmitry Adamushko
2006-03-11 11:47 ` [Xenomai-core] " Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.