From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Monotonic, realtime, and other timers
Date: Mon, 25 Jun 2007 20:50:10 +0200 [thread overview]
Message-ID: <46800E62.9090300@domain.hid> (raw)
In-Reply-To: <18048.2782.400727.660810@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]
Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
> > +/* Timer operation modes */
> > +typedef enum xntimer_mode {
> > + XNTM_MONOREL = 0,
> > + XNTM_MONOABS = XNTIMER_ABSOLUTE,
> > + XNTM_REALABS = XNTIMER_REALTIME | XNTIMER_ABSOLUTE
> > +} xntimer_mode_t;
>
> Is not it a bit weird to use enums ? I meanç we use #defines everywhere
> else.
I'm starting to like these kind of types, because they express what
values are expected and allowed here. Anyway, if this is not desired, I
can use plain defines again as well.
>
> > + default: /* XNTM_MONOABS || XNTM_REALABS */
> > date = xnarch_ns_to_tsc(value);
> > if (date <= now)
> > return -ETIMEDOUT;
> > + __setbits(timer->status, XNTIMER_REALTIME);
> > + break;
>
> Having the same treatment for absolute monotonic and realtime clocks
> looks suspicious.
Nope, please have a look at the two line above this excerpt, they should
explain the difference.
>
>
> > + default: /* XNTM_MONOABS || XNTM_REALABS */
> > if (value <= timer->base->jiffies)
> > return -ETIMEDOUT;
> > + __setbits(timer->status, XNTIMER_REALTIME);
> > + break;
>
> Same here
>
>
Thanks for a having a view,
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2007-06-25 18:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-23 8:08 [Xenomai-core] Monotonic, realtime, and other timers Jan Kiszka
2007-06-23 10:25 ` Philippe Gerum
2007-06-23 11:39 ` Jan Kiszka
2007-06-23 18:37 ` Philippe Gerum
2007-06-24 8:43 ` Jan Kiszka
2007-06-24 17:17 ` Gilles Chanteperdrix
2007-06-26 13:39 ` Jan Kiszka
2007-06-26 19:12 ` Gilles Chanteperdrix
2007-06-26 19:41 ` Jan Kiszka
2007-06-26 22:52 ` Gilles Chanteperdrix
2007-06-27 11:49 ` Jan Kiszka
2007-06-26 19:37 ` Philippe Gerum
2007-06-24 18:15 ` Philippe Gerum
2007-06-25 6:12 ` Jan Kiszka
2007-06-25 10:49 ` Gilles Chanteperdrix
2007-06-25 10:58 ` Jan Kiszka
2007-06-25 14:34 ` Jan Kiszka
2007-06-25 18:35 ` Gilles Chanteperdrix
2007-06-25 18:50 ` Jan Kiszka [this message]
2007-06-25 22:15 ` 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=46800E62.9090300@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=gilles.chanteperdrix@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.