Module: xenomai-forge
Branch: next
Commit: 932600f843eda9319333e3518ce3637f0b91ee49
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=932600f843eda9319333e3518ce3637f0b91ee49

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Jul  6 20:17:20 2014 +0200

cobalt: fix debug with single-shot timers

---

 kernel/cobalt/clock.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/kernel/cobalt/clock.c b/kernel/cobalt/clock.c
index a578f89..1107f7a 100644
--- a/kernel/cobalt/clock.c
+++ b/kernel/cobalt/clock.c
@@ -619,10 +619,9 @@ void xnclock_tick(struct xnclock *clock)
                         * wait for 250 ms for the user to continue
                         * program execution.
                         */
-                       if (timer->interval_ns > 250000000)
-                               goto advance;
-                       interval_ticks = 250000000 /
-                               (unsigned)timer->interval_ns;
+                       xntimerh_date(&timer->aplink) +=
+                               xnclock_ns_to_ticks(xntimer_clock(timer),
+                                               250000000);
                        goto requeue;
                }
        fire:
@@ -638,11 +637,11 @@ void xnclock_tick(struct xnclock *clock)
                        continue;
        advance:
                interval_ticks = 1;
-       requeue:
                do {
                        timer->periodic_ticks += interval_ticks;
                        xntimer_update_date(timer);
                } while (xntimerh_date(&timer->aplink) < now + clock->gravity);
+       requeue:
 #ifdef CONFIG_SMP
                /*
                 * Make sure to pick the right percpu queue, in case


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

Reply via email to