Re: simple (i386) spinlock implementation questions...

From: Alexander Viro (viro@math.psu.edu)
Date: Mon May 15 2000 - 20:13:00 EST


On Mon, 15 May 2000, Jeff Garzik wrote:

> do { ... } while (0) is the standard way of enclosing a block of code
> in a macro. You are correct that you only need "{ ... }" for most
> situations. I can't remember if the "do/while" is a relic of old K&R
> compiler compatibility habits, or if there are a few semantic situations
> which exist today that require do/while not just {}.

if (foo) bar(); else baz();

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:27 EST