halt/reset on assert?

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Apr 7 17:55:33 EST 2011


On Wed, 2011-04-06 at 14:01 +0100, Evan Lavelle wrote:
> #define MY_ASSERT(expr) if(!(expr)) BUG()

Make it

#define MY_ASSERT(expr) do { if .... } while(0)

To ensure it has proper single statement semantics in C.

Cheers,
Ben.




More information about the Linuxppc-dev mailing list