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


Xenomai-core mailing list

Reply via email to