Module: xenomai-2.5 Branch: master Commit: e0797cecc5453fb6db0bc202632184ee92de961e URL: http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=e0797cecc5453fb6db0bc202632184ee92de961e
Author: Gilles Chanteperdrix <[email protected]> Date: Mon Aug 2 01:19:45 2010 +0200 sched: avoid infinite reschedule loops By resetting the "switched" variable to 0 upon restart of the scheduling procedure. --- ksrc/nucleus/pod.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ksrc/nucleus/pod.c b/ksrc/nucleus/pod.c index 7002a73..8bfa49f 100644 --- a/ksrc/nucleus/pod.c +++ b/ksrc/nucleus/pod.c @@ -2162,7 +2162,7 @@ static inline int __xnpod_test_resched(struct xnsched *sched) void __xnpod_schedule(struct xnsched *sched) { struct xnthread *prev, *next, *curr = sched->curr; - int zombie, switched = 0, need_resched, shadow; + int zombie, switched, need_resched, shadow; spl_t s; if (xnarch_escalate()) @@ -2176,6 +2176,7 @@ void __xnpod_schedule(struct xnsched *sched) xnarch_user_pid(xnthread_archtcb(curr)) : -1, xnthread_current_priority(curr)); reschedule: + switched = 0; need_resched = __xnpod_test_resched(sched); #if !XENO_DEBUG(NUCLEUS) if (!need_resched) _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
