From: Jan Kiszka <jan.kiszka@domain.hid>
To: Rodrigo Rosenfeld Rosas <lbocseg@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] RTDM timing problems
Date: Mon, 30 Jan 2006 19:42:13 +0100 [thread overview]
Message-ID: <43DE5E05.1030302@domain.hid> (raw)
In-Reply-To: <200601301611.53089.lbocseg@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]
Rodrigo Rosenfeld Rosas wrote:
> Hi,
>
> I just can't understand what is happening.
>
> The above code on my driver initialization gives the following results.
>
> start_time = rtdm_clock_read();
> rtdm_task_busy_sleep(43000);
> temp_time = rtdm_clock_read();
> rtdm_printk(KERN_INFO "%u - %u = %u\n",(unsigned int) temp_time, (unsigned
> int) start_time, (unsigned int) (temp_time-start_time));
>
> rtdm_printk(KERN_INFO "%u - %u = %u\n",(unsigned int)
> (temp_time&0xffffffff), (unsigned int) start_time&0xffffffff, (unsigned int)
> ((temp_time-start_time)&0xffffffff));
>
>
> As I expected, both printk gave the same (wrong?) result:
> 3175950208 - 2800623168 = 375327040
>
> I was waiting something near to 43000, shouldn't I?
>
> Please, can someone explain me what is going on...
>
Basically confirmed:
I-pipe: Domain Xenomai registered.
Xenomai: hal/x86 started.
Xenomai: real-time nucleus v2.1-rc2 (Champagne) loaded.
Xenomai: starting RTDM services.
4194262080 - 2680902336 = 1513359744
But when I additionally load xeno_posix to get the system timer started:
Xenomai: starting POSIX services.
3899754503 - 3899706087 = 48416
The point is that rtdm_clock_read() relies on the nucleus timer being
started. Otherwise, it just returns plain wrong numbers.
This makes me scream again for that damn timer being started
AUTOMATICALLY! I guess Philippe knows what I'm talking about... ;)
Meanwhile, we should state this in the docs. At least for 2.0.x, this
will remain true anyway.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-01-30 18:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 18:11 [Xenomai-help] RTDM timing problems Rodrigo Rosenfeld Rosas
2006-01-30 18:42 ` Jan Kiszka [this message]
2006-01-30 23:17 ` Jeroen Van den Keybus
2006-01-31 9:46 ` Jan Kiszka
2006-02-02 12:46 ` Rodrigo Rosenfeld Rosas
2006-02-02 12:48 ` Jan Kiszka
2006-02-02 15:23 ` Rodrigo Rosenfeld Rosas
2006-02-02 16:26 ` Jan Kiszka
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=43DE5E05.1030302@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=lbocseg@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.