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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Jul 15 17:25:49 2016 +0200

cobalt/timer: prevent double dequeuing in overrun handler

---

 kernel/cobalt/timer.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/cobalt/timer.c b/kernel/cobalt/timer.c
index c1a2081..1c79013 100644
--- a/kernel/cobalt/timer.c
+++ b/kernel/cobalt/timer.c
@@ -604,7 +604,8 @@ unsigned long long xntimer_get_overruns(struct xntimer 
*timer, xnticks_t now)
 
                if (xntimer_running_p(timer)) {
                        q = xntimer_percpu_queue(timer);
-                       xntimer_dequeue(timer, q);
+                       if ((timer->status & XNTIMER_DEQUEUED) == 0)
+                               xntimer_dequeue(timer, q);
                        while (xntimerh_date(&timer->aplink) < now) {
                                timer->periodic_ticks++;
                                xntimer_update_date(timer);


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

Reply via email to