* [Xenomai-help] rt_task_set_periodic() question
@ 2008-07-09 6:32 Thomas Häberle
2008-07-09 8:14 ` Gilles Chanteperdrix
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Häberle @ 2008-07-09 6:32 UTC (permalink / raw)
To: xenomai
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
From step 3 I get the return value "-110" which is "ETIMEDOUT" (AFAIK)
thus according to the Xenomai-documentation the calculated new
sheduling point allready passed.
I miss the point where I do something wrong!?!?
It doesn't seem to matter how much I increase "t_start", the return
value stays at -110,
so I guess I missunderstood the usage of one of the functions!?!?
Any hints or suggestions?
Thanks & Greetings,
Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Xenomai-help] rt_task_set_periodic() question
2008-07-09 6:32 [Xenomai-help] rt_task_set_periodic() question Thomas Häberle
@ 2008-07-09 8:14 ` Gilles Chanteperdrix
0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2008-07-09 8:14 UTC (permalink / raw)
To: Thomas Häberle; +Cc: xenomai
[-- 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:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-09 8:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-09 6:32 [Xenomai-help] rt_task_set_periodic() question Thomas Häberle
2008-07-09 8:14 ` Gilles Chanteperdrix
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.