All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
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:09:03 +0100	[thread overview]
Message-ID: <456332AF.8010106@domain.hid> (raw)
In-Reply-To: <45632BFA.30000@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

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.

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?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-11-21 17:09 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 [this message]
2006-11-21 17:28     ` Philippe Gerum
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=456332AF.8010106@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.