From: Jan Kiszka <jan.kiszka@domain.hid>
To: Klaas Gadeyne <klaas.gadeyne@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rt_task_sleep_until question
Date: Sat, 12 Apr 2008 15:11:22 +0200 [thread overview]
Message-ID: <4800B4FA.1050309@domain.hid> (raw)
In-Reply-To: <Pine.LNX.4.64.0804111759280.5433@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]
Klaas Gadeyne wrote:
> Hi,
>
> I've noticed that threads which, in my ignorant opinion, are supposed
> to be sleeping, get woken up much earlier than I expect them to be.
>
> Please find attached a modified version of the trivial-periodic.c
> application, which creates a RT_TASK that should sleep as long as
> possible (i.e. until unblocked by a signal handler). However, the
> task gets woken up much earlier (and many times) _before_ that time it
> seems.
>
> head /tmp/app.txt
> current_time = 1207928393295939429
> sleep until 18446744073709551615
> [TIMERLOOP] Total errors = 1, return code = -110
> current_time = 1207928393296000379
> sleep until 18446744073709551615
> [TIMERLOOP] Total errors = 2, return code = -110
> current_time = 1207928393296005409
> sleep until 18446744073709551615
> [TIMERLOOP] Total errors = 3, return code = -110
> current_time = 1207928393296009604
>
> What did I overlook here?
Probably an overflow issue: (RTIME)~0 will be converted to TSCs, and if
your box runs at > 1GHZ, the result of this conversion will by something
< (RTIME)~0 due to the overflow. And this can result in an absolute
timeout date (in TSC units) before the current date -> ETIMEDOUT. Can
you confirm this?
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2008-04-12 13:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-11 16:09 [Xenomai-help] rt_task_sleep_until question Klaas Gadeyne
2008-04-12 13:11 ` Jan Kiszka [this message]
2008-04-12 15:32 ` klaas.gadeyne
2008-04-12 16:01 ` Gilles Chanteperdrix
2008-04-17 15:23 ` Klaas Gadeyne
2008-04-17 15:30 ` Gilles Chanteperdrix
2008-04-17 15:46 ` Gilles Chanteperdrix
2008-04-17 16:07 ` Philippe Gerum
2008-04-17 16:39 ` Gilles Chanteperdrix
2008-04-22 13:45 ` Klaas Gadeyne
2008-04-22 13:49 ` Philippe Gerum
2008-04-22 14:25 ` Klaas Gadeyne
2008-04-22 20:56 ` Philippe Gerum
2008-04-23 11:27 ` Klaas Gadeyne
2008-04-23 11:37 ` Philippe Gerum
2008-04-23 12:53 ` Bosko Radivojevic
2008-04-23 17:43 ` Philippe Gerum
2008-08-01 23:07 ` [Xenomai-help] Recurring Interrupts Henry Bausley
2008-08-02 7:38 ` Philippe Gerum
2008-08-02 12:24 ` 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=4800B4FA.1050309@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=klaas.gadeyne@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.