Module: xenomai-2.6
Branch: master
Commit: 17f60ec3b0a3847200d6625851fe90a2addd9662
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=17f60ec3b0a3847200d6625851fe90a2addd9662

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Jan  4 20:27:04 2013 +0100

nucleus: Fix iteration over IRQs for /proc/xenomai/stat output

This got broken during the introduction of vfile: We want to iterated
over all CPUs and all shared interrupts for each IRQ number. So only
increase the number when xnintr_query_next signals the end.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 ksrc/nucleus/sched.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ksrc/nucleus/sched.c b/ksrc/nucleus/sched.c
index 61957e6..5d2f074 100644
--- a/ksrc/nucleus/sched.c
+++ b/ksrc/nucleus/sched.c
@@ -909,10 +909,11 @@ scan_irqs:
        if (priv->irq >= XNARCH_NR_IRQS)
                return 0;       /* All done. */
 
-       ret = xnintr_query_next(priv->irq++, &priv->intr_it, p->name);
+       ret = xnintr_query_next(priv->irq, &priv->intr_it, p->name);
        if (ret) {
                if (ret == -EAGAIN)
                        xnvfile_touch(it->vfile); /* force rewind. */
+               priv->irq++;
                return VFILE_SEQ_SKIP;
        }
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to