Module: xenomai-3
Branch: stable-3.0.x
Commit: ff70dfdea9e2ffcb1ad7db10c695fe5dc4aff8a0
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ff70dfdea9e2ffcb1ad7db10c695fe5dc4aff8a0

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Nov  8 16:11:03 2016 +0100

cobalt/timer: rbtree: fix inverted logic in helper testing emptiness

xntimerq_empty() was wrong in the rbtree-based implementation of the
timer management code, not detecting emptiness of timer queues.

This issue caused the debug assertion in xnclock_deregister() to
trigger when XENO_OPT_DEBUG_COBALT is enabled.

---

 include/cobalt/kernel/timer.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/cobalt/kernel/timer.h b/include/cobalt/kernel/timer.h
index f45a753..d92c8c8 100644
--- a/include/cobalt/kernel/timer.h
+++ b/include/cobalt/kernel/timer.h
@@ -163,7 +163,7 @@ typedef struct {
        })
 
 #define xntimerq_destroy(q) do { } while (0)
-#define xntimerq_empty(q) ((q)->head != NULL)
+#define xntimerq_empty(q) ((q)->head == NULL)
 
 #define xntimerq_head(q) ((q)->head)
 


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

Reply via email to