From: Philippe Gerum <rpm@xenomai.org>
To: Dmitry Adamushko <dmitry.adamushko@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [patch, minor] xnpipe_recv and xntimer_get_timeout_periodic()
Date: Mon, 21 Aug 2006 11:49:11 +0200 [thread overview]
Message-ID: <1156153751.4402.28.camel@domain.hid> (raw)
In-Reply-To: <b647ffbd0608210136w7ca05265o5ef930c1bee24d65@domain.hid>
On Mon, 2006-08-21 at 10:36 +0200, Dmitry Adamushko wrote:
> [ timer.c.patch] xnticks_t is unsigned while (as I understand)
> "xntlholder_date(&timer->plink) - nkpod->jiffies" can be negative.
Well, normally, it should not. In periodic mode, each and every tick is
processed by the timer handler which also maintains the time base
(nkpod->jiffies), and as such, no timer should remain outstanding after
its wakeup time has elapsed, otherwise, something is broken in the timer
wheel management in the first place.
IOW, we should never miss a tick, and consequently, negative timeouts
cannot exist, since a timer is either running (= 0), or scheduled to
elapse in the future (> 0). On the contrary, aperiodic mode is based on
some free running TSC value not controlled by the nucleus, and as such,
we might well ask for the timeout value slightly before the related
timer elapses, and end up reading the TSC a bit later than its timeout
date.
--
Philippe.
next prev parent reply other threads:[~2006-08-21 9:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-21 8:36 [Xenomai-core] [patch, minor] xnpipe_recv and xntimer_get_timeout_periodic() Dmitry Adamushko
2006-08-21 9:36 ` Philippe Gerum
2006-08-21 9:49 ` Philippe Gerum [this message]
2006-08-21 17:45 ` Dmitry Adamushko
2006-08-21 18:02 ` Philippe Gerum
2006-08-21 10:02 ` Philippe Gerum
2006-08-21 10:47 ` Dmitry Adamushko
2006-08-21 11:27 ` Philippe Gerum
[not found] ` <b647ffbd0608210446v38656cecxc231dba4e8f55dc2@domain.hid>
2006-08-21 11:47 ` Dmitry Adamushko
2006-08-21 12:45 ` 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=1156153751.4402.28.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=dmitry.adamushko@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.