From: Timothy Miller <miller@techsource.com>
To: Aschwin Marsman <a.marsman@aYniK.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Coding technique question
Date: Mon, 16 Jun 2003 16:23:06 -0400 [thread overview]
Message-ID: <3EEE272A.2040208@techsource.com> (raw)
In-Reply-To: Pine.LNX.4.44.0306162202480.1924-100000@localhost.localdomain
Thank you for pointing this out to me. It's very interesting reading.
Aschwin Marsman wrote:
> On Mon, 16 Jun 2003, Timothy Miller wrote:
>
>
>>I believe I've seen this sort of thing done in the kernel:
>>
>>do {
>> ....
>> code
>> ....
>>} while (0);
>>
>>
>>What I was wondering is how this is any different from:
>>
>>{
>> ....
>> code
>> ....
>>}
>
>
> See the Kernel Newbies FAQ at http://kernelnewbies.org/faq/
> Q: "Why do a lot of #defines in the kernel use do { ... } while(0)? "
>
> Best regards,
>
> Aschwin Marsman
>
> --
> aYniK Software Solutions all You need is Knowledge
> Bedrijvenpark Twente 305 NL-7602 KL Almelo - the Netherlands
> P.O. box 134 NL-7600 AC Almelo - the Netherlands
> a.marsman@aYniK.com http://www.aYniK.com
>
>
>
next prev parent reply other threads:[~2003-06-16 19:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-16 20:03 Coding technique question Timothy Miller
2003-06-16 19:56 ` Jeff Garzik
2003-06-16 20:05 ` Aschwin Marsman
2003-06-16 20:23 ` Timothy Miller [this message]
2003-06-19 2:16 ` david nicol
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=3EEE272A.2040208@techsource.com \
--to=miller@techsource.com \
--cc=a.marsman@aYniK.com \
--cc=linux-kernel@vger.kernel.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.