Re: [Infiniband-general] Getting an Infiniband access layer in theLinux kernel
From: Matti Aarnio
Date: Fri Feb 06 2004 - 14:04:06 EST
On Fri, Feb 06, 2004 at 01:50:42PM -0500, Richard B. Johnson wrote:
....
> In spite of the fact that the gcc compiler I'm using doesn't
> care, and generates the same code either way, there are others
> in the world who have looked at Linux code, in particular
> the headers, and turned various shades of grey just before
> running off to the head. I have spent a bunch of time looking
> at C/C++ headers for Sun and W$ and the only place I've
> ever seen the "do {} while(0)" stuff is in Linux. I think
> it started with Linux (was a Linux Invention!), as some
> kind of work-around, then it became a "Linux Signature".
It is actually "GCC Signature" from way back when of 1.x versions
of gcc. It is also exemplified by rather decent explanations, of why
#define max(a,b) ((a > b) ? a : b)
is bad, and should be done with way more complex thing involving
complex contortions of do ... while(0) ...
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.4.24 on an i986 machine (797.90 BogoMips).
> Note 96.31% of all statistics are fiction.
/Matti Aarnio
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/