* [Xenomai-help] rt_task_set_periodic
@ 2010-06-14 18:20 Ramon
2010-06-14 19:15 ` Gilles Chanteperdrix
0 siblings, 1 reply; 2+ messages in thread
From: Ramon @ 2010-06-14 18:20 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
Hi,
I'm beginning to work with periodical task in xenomai. Currently I'm
using rt_task_set_periodic.
The third parameter RTIME period allows to specify the period in clock
ticks (taken from :
http://www.xenomai.org/documentation/xenomai-2.5/html/api/group__task.html).
I would like to know how can I get information from the clock tick
(which is the value? , can be changed ?) ?
Why Is the minimum period I can use in user space ? (experimentally it
seems to be 0.1ms in my system)
Working in kernel space this period is lower ?
When using the POSIX skin
int pthread_make_periodic_np ( pthread_t thread,struct
timespec * starttp,struct timespec * periodtp )
the resolution is the same ? (performance will be the same ?)
Is there any simple approach to develop a periodic task using the POSIX
commands (pthread_cond_timedwait
<group__posix__cond.html#gfc43955fc3f1cb43723a9e0be19d0ad1> ?) ?
Thank you in advance
Ramon
[-- Attachment #2: Type: text/html, Size: 2112 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-help] rt_task_set_periodic
2010-06-14 18:20 [Xenomai-help] rt_task_set_periodic Ramon
@ 2010-06-14 19:15 ` Gilles Chanteperdrix
0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2010-06-14 19:15 UTC (permalink / raw)
To: ramoncostacastello; +Cc: xenomai
Ramon wrote:
> Hi,
>
> I'm beginning to work with periodical task in xenomai. Currently I'm
> using rt_task_set_periodic.
>
> The third parameter RTIME period allows to specify the period in clock
> ticks (taken from :
> http://www.xenomai.org/documentation/xenomai-2.5/html/api/group__task.html).
>
> I would like to know how can I get information from the clock tick
> (which is the value? , can be changed ?) ?
the API provides some functions to convert between ticks and durations
in nanoseconds. If the timer runs in aperiodic mode, however, the
duration of the tick is one nanosecond. If the timer runs in periodic
mode, the tick duration is the period of the periodic timer. All this,
of course, is documented in Xenomai API documentation.
>
> Why Is the minimum period I can use in user space ? (experimentally it
> seems to be 0.1ms in my system)
Depends on your system. Also depends on the load you are running. You
can measure this with the "latency" test.
> Working in kernel space this period is lower ?
Probably, again, depends on your system.
>
>
> When using the POSIX skin
> int pthread_make_periodic_np ( pthread_t thread,struct
> timespec * starttp,struct timespec * periodtp )
> the resolution is the same ? (performance will be the same ?)
I guess you mean latency. Yes, the latency depends on your system, not
really on the skin you are using. The various Xenomai skins rely on a
the same common core. This is explained in the various documents which
you will find on Xenomai web site.
>
> Is there any simple approach to develop a periodic task using the POSIX
> commands (pthread_cond_timedwait
> <group__posix__cond.html#gfc43955fc3f1cb43723a9e0be19d0ad1> ?) ?
The POSIX way to run periodic tasks is with the clock_nanosleep with
absolute dates. Or to create a timer and run sigwait to wait for next
period, but this will not work (yet) with Xenomai.
--
Gilles.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-14 19:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-14 18:20 [Xenomai-help] rt_task_set_periodic Ramon
2010-06-14 19:15 ` 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.