From: Philippe Gerum <rpm@xenomai.org>
To: alberto.ozalla@cgglobal.com,
"gilles.chanteperdrix@xenomai.org"
<gilles.chanteperdrix@xenomai.org>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] rt_task_sleep_until() miss release point?
Date: Thu, 06 Nov 2014 21:22:35 +0100 [thread overview]
Message-ID: <545BD88B.3030700@xenomai.org> (raw)
In-Reply-To: <545BA5D0.7010907@cgglobal.com>
On 11/06/2014 05:46 PM, ZIV-Alberto Ozalla Cantabrana wrote:
> Hi,
>
> These are the simplest examples:
> There are no MSW for Test_Task.
> The goal is to increment counter_ms each millisecond.
>
> Given that:
> 1000000 nanoseconds = 24000 tsc.
> 1 tsc = 41 ns
>
Is rt_timer_ns2tsc(1000000) actually returning 24000 on your platform?
> void Test_Task(void *arg)
> {
> rt_task_set_mode(0, 0, NULL);
This is useless and not recommended. A newly created task always starts
in primary mode.
> while (1) {
>
> unsigned long long before = counter_ms;
> usleep(1000000); // 1 second.
Although this would rather cause higher count values, this non-rt main
using a non-rt sleep service won't give you an accurate delay for the
measurement.
--
Philippe.
next prev parent reply other threads:[~2014-11-06 20:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 15:24 [Xenomai] rt_task_sleep_until() miss release point? ZIV-Alberto Ozalla Cantabrana
2014-11-06 15:37 ` Gilles Chanteperdrix
2014-11-06 15:52 ` ZIV-Alberto Ozalla Cantabrana
2014-11-06 15:55 ` Gilles Chanteperdrix
2014-11-06 16:46 ` ZIV-Alberto Ozalla Cantabrana
2014-11-06 20:22 ` Philippe Gerum [this message]
2014-11-07 9:25 ` ZIV-Alberto Ozalla Cantabrana
2014-11-07 9:37 ` Gilles Chanteperdrix
2014-11-07 9:42 ` Philippe Gerum
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=545BD88B.3030700@xenomai.org \
--to=rpm@xenomai.org \
--cc=alberto.ozalla@cgglobal.com \
--cc=gilles.chanteperdrix@xenomai.org \
--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.