Module: xenomai-jki
Branch: for-upstream
Commit: e807e55e1d6dbb8fa662baabeb88acf438573347
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=e807e55e1d6dbb8fa662baabeb88acf438573347

Author: Jan Kiszka <[email protected]>
Date:   Thu Nov  4 12:55:04 2010 +0100

nucleus: Drop debug check for spurious __xnpod_schedule calls

The findings of 56ff4329ff /wrt to the debug check still hold. As its
use case is very limited (check that the nucleus paired a runqueue
manipulation with xnsched_set_resched) and it is hard - if not
impossible - to avoid false positives, simply drop it.

Signed-off-by: Jan Kiszka <[email protected]>

---

 include/nucleus/pod.h |    5 -----
 ksrc/nucleus/pod.c    |   11 ++++-------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/include/nucleus/pod.h b/include/nucleus/pod.h
index 01ff0a7..71f8311 100644
--- a/include/nucleus/pod.h
+++ b/include/nucleus/pod.h
@@ -277,14 +277,9 @@ static inline void xnpod_schedule(void)
         * context is active, or if we are caught in the middle of a
         * unlocked context switch.
         */
-#if XENO_DEBUG(NUCLEUS)
-       if (testbits(sched->status, XNKCOUT|XNINIRQ|XNSWLOCK))
-               return;
-#else /* !XENO_DEBUG(NUCLEUS) */
        if (testbits(sched->status,
                     XNKCOUT|XNINIRQ|XNSWLOCK|XNRESCHED) != XNRESCHED)
                return;
-#endif /* !XENO_DEBUG(NUCLEUS) */
 
        __xnpod_schedule(sched);
 }
diff --git a/ksrc/nucleus/pod.c b/ksrc/nucleus/pod.c
index 862838c..14c7534 100644
--- a/ksrc/nucleus/pod.c
+++ b/ksrc/nucleus/pod.c
@@ -2185,7 +2185,7 @@ static inline int __xnpod_test_resched(struct xnsched 
*sched)
 
 void __xnpod_schedule(struct xnsched *sched)
 {
-       int zombie, switched, need_resched, shadow;
+       int zombie, switched, shadow;
        struct xnthread *prev, *next, *curr;
        spl_t s;
 
@@ -2203,11 +2203,10 @@ void __xnpod_schedule(struct xnsched *sched)
                         xnthread_current_priority(curr));
 reschedule:
        switched = 0;
-       need_resched = __xnpod_test_resched(sched);
-#if !XENO_DEBUG(NUCLEUS)
-       if (!need_resched)
+
+       if (!__xnpod_test_resched(sched))
                goto signal_unlock_and_exit;
-#endif /* !XENO_DEBUG(NUCLEUS) */
+
        zombie = xnthread_test_state(curr, XNZOMBIE);
 
        next = xnsched_pick_next(sched);
@@ -2222,8 +2221,6 @@ reschedule:
                goto signal_unlock_and_exit;
        }
 
-       XENO_BUGON(NUCLEUS, need_resched == 0);
-
        prev = curr;
 
        trace_mark(xn_nucleus, sched_switch,


_______________________________________________
Xenomai-git mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-git

Reply via email to