From: ZIV-Alberto Ozalla Cantabrana <alberto.ozalla@cgglobal.com>
To: "rpm@xenomai.org" <rpm@xenomai.org>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] rt_task_sleep_until() miss release point?
Date: Fri, 7 Nov 2014 09:25:21 +0000 [thread overview]
Message-ID: <545C9001.7070508@cgglobal.com> (raw)
In-Reply-To: <545BD88B.3030700@xenomai.org>
On 06/11/14 21:22, Philippe Gerum wrote:
> 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?
> Yes.
>> 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.
>
> Ok. I will delete it.
>> 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.
>
> It is only an example.
--
Saludos,
Alberto Ozalla
CG DISCLAIMER: This email contains confidential information. It is intended exclusively for the addressees. If you are not an addressee, you must not store, transmit or disclose its contents. Instead please notify the sender immediately; and permanently delete this e-mail from your computer systems. We have taken reasonable precautions to ensure that no viruses are present. However, you must check this email and the attachments, for viruses. We accept no liability whatsoever, for any detriment caused by any transmitted virus.
next prev parent reply other threads:[~2014-11-07 9:25 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
2014-11-07 9:25 ` ZIV-Alberto Ozalla Cantabrana [this message]
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=545C9001.7070508@cgglobal.com \
--to=alberto.ozalla@cgglobal.com \
--cc=rpm@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.