From: Randy Dunlap <randy.dunlap@oracle.com>
To: paulmck@linux.vnet.ibm.com
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
mingo@elte.hu, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Steven Rostedt <rostedt@goodmis.org>,
Nicholas Miell <nmiell@comcast.net>,
Linus Torvalds <torvalds@linux-foundation.org>,
laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, josh@joshtriplett.org,
dvhltc@us.ibm.com, niv@us.ibm.com, tglx@linutronix.de,
peterz@infradead.org, Valdis.Kletnieks@vt.edu,
dhowells@redhat.com, Nick Piggin <npiggin@suse.de>,
Chris Friesen <cfriesen@nortel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] introduce sys_membarrier(): process-wide memory barrier (v10)
Date: Mon, 05 Apr 2010 13:23:55 -0700 [thread overview]
Message-ID: <4BBA46DB.9060106@oracle.com> (raw)
In-Reply-To: <20100405204021.GH2525@linux.vnet.ibm.com>
Paul E. McKenney wrote:
> On Mon, Apr 05, 2010 at 03:10:57PM -0400, Mathieu Desnoyers wrote:
>> * Randy Dunlap (randy.dunlap@oracle.com) wrote:
>>> On Mon, 5 Apr 2010 13:57:37 -0400 Mathieu Desnoyers wrote:
>
> [ . . . ]
>
>>>> +#else /* #ifdef CONFIG_SMP */
>>> I don't know that we have a known convention for that, but I would use:
>>>
>>> #else /* not CONFIG_SMP */
>>>
>>> or
>>>
>>> #else /* !CONFIG_SMP */
>>>
>>>> +
>>>> +SYSCALL_DEFINE1(membarrier, unsigned int, flags)
>>>> +{
>>>> + return 0;
>>>> +}
>>>> +
>>>> +#endif /* #else #ifdef CONFIG_SMP */
or just:
#endif /* #else #ifdef CONFIG_SMP : tell the reader that the #else part of the #ifdef CONFIG_SMP just ended */
ad nauseum.
>>> and:
>>>
>>> #endif /* CONFIG_SMP */
>>>
>>> The "#else #ifdef" is both ugly and too wordy IMO.
>
> The extra words make it very clear that we are in at the end of the #else
> clause of a #ifdef with the given condition. With "#endif /* CONFIG_SMP
> */", is the immediately preceding code compiled under CONFIG_SMP or
> !CONFIG_SMP? You have to dig back and see whether or not there is a
> #else clause.
>
> But there is no accounting for taste. ;-)
IYHO.
regards.
next prev parent reply other threads:[~2010-04-05 21:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 17:57 [PATCH] introduce sys_membarrier(): process-wide memory barrier (v10) Mathieu Desnoyers
2010-04-05 18:38 ` Randy Dunlap
2010-04-05 19:10 ` Mathieu Desnoyers
2010-04-05 20:40 ` Paul E. McKenney
2010-04-05 20:23 ` Randy Dunlap [this message]
2010-04-05 21:39 ` Paul E. McKenney
2010-04-05 22:01 ` Mathieu Desnoyers
2010-04-05 21:08 ` Josh Triplett
2010-04-05 22:08 ` Mathieu Desnoyers
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=4BBA46DB.9060106@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=cfriesen@nortel.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dvhltc@us.ibm.com \
--cc=josh@joshtriplett.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.com \
--cc=nmiell@comcast.net \
--cc=npiggin@suse.de \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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.