Module: xenomai-forge
Branch: master
Commit: 9914b1c593876ae133aadfc83e7c81541de286f3
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=9914b1c593876ae133aadfc83e7c81541de286f3

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

cobalt/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>

---

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

diff --git a/kernel/cobalt/nucleus/sched.c b/kernel/cobalt/nucleus/sched.c
index 226a88b..09b0e27 100644
--- a/kernel/cobalt/nucleus/sched.c
+++ b/kernel/cobalt/nucleus/sched.c
@@ -831,10 +831,11 @@ scan_irqs:
        if (priv->irq >= IPIPE_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