Module: xenomai-jki Branch: for-upstream Commit: 89e0fc94f235664b66c2bd7353c6c9dc1168d781 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=89e0fc94f235664b66c2bd7353c6c9dc1168d781
Author: Jan Kiszka <[email protected]> Date: Thu Nov 4 16:39:05 2010 +0100 nucleus: Consolidate xnsched_self_resched_p It is identical to xnsched_resched_p today. Signed-off-by: Jan Kiszka <[email protected]> --- include/nucleus/sched.h | 7 +------ ksrc/nucleus/timer.c | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/nucleus/sched.h b/include/nucleus/sched.h index bb08918..e3a22c7 100644 --- a/include/nucleus/sched.h +++ b/include/nucleus/sched.h @@ -164,17 +164,12 @@ struct xnsched_class { #define xnsched_cpu(__sched__) ({ (void)__sched__; 0; }) #endif /* CONFIG_SMP */ -/* Test all resched flags from the given scheduler mask. */ +/* Test is resched mask of given sched /may/ be non-empty. */ static inline int xnsched_resched_p(struct xnsched *sched) { return testbits(sched->status, XNRESCHED); } -static inline int xnsched_self_resched_p(struct xnsched *sched) -{ - return testbits(sched->status, XNRESCHED); -} - /* Set self resched flag for the given scheduler. */ #define xnsched_set_self_resched(__sched__) do { \ xnarch_cpu_set(xnsched_cpu(__sched__), (__sched__)->resched); \ diff --git a/ksrc/nucleus/timer.c b/ksrc/nucleus/timer.c index 1fe3331..a0ac627 100644 --- a/ksrc/nucleus/timer.c +++ b/ksrc/nucleus/timer.c @@ -97,7 +97,7 @@ void xntimer_next_local_shot(xnsched_t *sched) __clrbits(sched->status, XNHDEFER); timer = aplink2timer(h); if (unlikely(timer == &sched->htimer)) { - if (xnsched_self_resched_p(sched) || + if (xnsched_resched_p(sched) || !xnthread_test_state(sched->curr, XNROOT)) { h = xntimerq_it_next(&sched->timerqueue, &it, h); if (h) { _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
