From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Thomas Häberle" <thomas.haeberle@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rt_task_set_periodic() question
Date: Wed, 09 Jul 2008 10:14:51 +0200 [thread overview]
Message-ID: <4874737B.7000905@domain.hid> (raw)
In-Reply-To: <48745B79.7020100@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
Thomas Häberle wrote:
> Hello!
>
> I am using Xenomai 2.3.5 with a Linux Kernel 2.4 on an MPC5200.
>
> One of my periodic Xenomai tasks has to be rescheduled now and than for
> some -for the question unimportant- reasons.
> To do so I
> 1.) get the next planed release point with "rt_task_inquire(NULL,
> &tt_info)"
> 2.) add the desired delay to the sheduling point with "t_start =
> RTIME(tt_info.relpoint + delay)"
> (delay is always a positive value)
> 3.) call "rt_task_set_periodict_task_set_periodic( NULL, t_start,
> ONE_MS)" to reshedule the task
Could you try the attached patch ?
--
Gilles.
[-- Attachment #2: xeno-2.3.x-fix-relpoint.diff --]
[-- Type: text/plain, Size: 640 bytes --]
Index: ksrc/skins/native/task.c
===================================================================
--- ksrc/skins/native/task.c (r������vision 4041)
+++ ksrc/skins/native/task.c (copie de travail)
@@ -1120,7 +1120,8 @@ int rt_task_inquire(RT_TASK *task, RT_TA
info->bprio = xnthread_base_priority(&task->thread_base);
info->cprio = xnthread_current_priority(&task->thread_base);
info->status = xnthread_state_flags(&task->thread_base);
- info->relpoint = xntimer_get_date(&task->thread_base.ptimer);
+ info->relpoint = xntimer_get_date(&task->thread_base.ptimer)
+ + nkpod->wallclock_offset;
unlock_and_exit:
prev parent reply other threads:[~2008-07-09 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 6:32 [Xenomai-help] rt_task_set_periodic() question Thomas Häberle
2008-07-09 8:14 ` Gilles Chanteperdrix [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4874737B.7000905@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=thomas.haeberle@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.