From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] [PATCH 1/3] decouple spinlock stats from XENO_OPT_STATS
Date: Tue, 21 Nov 2006 18:28:27 +0100 [thread overview]
Message-ID: <1164130107.5006.139.camel@domain.hid> (raw)
In-Reply-To: <456332AF.8010106@domain.hid>
On Tue, 2006-11-21 at 18:09 +0100, Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
> > Jan Kiszka wrote:
> >> #ifdef CONFIG_XENO_SPINLOCK_DEBUG
> >> @@ -343,7 +340,7 @@ static inline spl_t __xnlock_get_irqsave
> >> #else /* !CONFIG_XENO_SPINLOCK_DEBUG */
> >> static inline spl_t __xnlock_get_irqsave (xnlock_t *lock)
> >> {
> >> -#endif /* !CONFIG_XENO_SPINLOCK_DEBUG */
> >> +#endif /* CONFIG_XENO_SPINLOCK_DEBUG */
> >
> > I prefer the notation:
> >
> > #if cond
> > #endif /* cond */
> >
> > and
> >
> > #if cond
> > #else /* !cond */
> > #endif /* !cond */
> >
> > to
> >
> > #if cond
> > #endif /* cond */
> >
> > and
> >
> > #if cond
> > #else /* !cond */
> > #endif /* cond */
> >
> > Because in the first case, when I see a #endif in the middle of a lot of
> > code, I immediately know what predicate is true above the #endif.
> >
>
> Ok, I understand the logic. Nevertheless, I had the impression the first
> scheme is used far more often than the second one in Xenomai and I-pipe,
> so I took the chance to consolidate the code.
Basically because I wrote those using the first convention.
>
> So, what should be the common rule from now on? Is there a kernel-style
> rule for this issue we should follow, or are we free and should convert
> to your preferred scheme?
>
Let's move to Gilles's convention; it's more readable.
> Jan
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
next prev parent reply other threads:[~2006-11-21 17:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 23:14 [Xenomai-core] [PATCH 1/3] decouple spinlock stats from XENO_OPT_STATS Jan Kiszka
2006-11-21 16:40 ` Gilles Chanteperdrix
2006-11-21 17:09 ` Jan Kiszka
2006-11-21 17:28 ` Philippe Gerum [this message]
2006-11-22 7:20 ` Jan Kiszka
2006-12-02 18:29 ` Philippe Gerum
2006-12-04 9:20 ` Gilles Chanteperdrix
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=1164130107.5006.139.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=jan.kiszka@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.