Module: xenomai-forge Branch: master Commit: 12fd9ae799cd84c91893a086ebfaade14d0e3f1e URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=12fd9ae799cd84c91893a086ebfaade14d0e3f1e
Author: Philippe Gerum <r...@xenomai.org> Date: Mon Nov 21 23:18:36 2011 +0100 nucleus/pod: allow disabling timeslicing in all sched classes --- kernel/cobalt/nucleus/pod.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/cobalt/nucleus/pod.c b/kernel/cobalt/nucleus/pod.c index a2f2b28..efcb7e5 100644 --- a/kernel/cobalt/nucleus/pod.c +++ b/kernel/cobalt/nucleus/pod.c @@ -2908,8 +2908,9 @@ EXPORT_SYMBOL_GPL(xnpod_wait_thread_period); * * @return 0 is returned upon success. Otherwise: * - * - -EINVAL is returned if the base scheduling class of the target - * thread does not support time-slicing. + * - -EINVAL is returned if @a quantum is not XN_INFINITE, and the + * base scheduling class of the target thread does not support + * time-slicing. * * Environments: * @@ -2925,15 +2926,14 @@ int xnpod_set_thread_tslice(struct xnthread *thread, xnticks_t quantum) xnlock_get_irqsave(&nklock, s); - if (thread->base_class->sched_tick == NULL) { - xnlock_put_irqrestore(&nklock, s); - return -EINVAL; - } - thread->rrperiod = quantum; xntimer_stop(&thread->rrbtimer); if (quantum != XN_INFINITE) { + if (thread->base_class->sched_tick == NULL) { + xnlock_put_irqrestore(&nklock, s); + return -EINVAL; + } xnthread_set_state(thread, XNRRB); xntimer_start(&thread->rrbtimer, quantum, quantum, XN_RELATIVE); _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git