A little explanation needed

Joshua Stewart (joshua.stewart@comcast.net)
Sun, 22 Dec 2002 00:36:32 -0500


Can anyone explain the purpose of this #define...

#define __cpu_raise_softirq(cpu, nr) do { softirq_pending(cpu) |= 1UL <<
(nr); } while (0) // from interrupt.h

...versus the more "plain"...

#define __cpu_raise_softirq(cpu,nr) softirq_pending(cpu |= 1UL << (nr).

In otherwords, what's the use of a do{X}while(0) "loop" instead of just
X. I'm not the world's best trained C programmer, so forgive me if I
sound stupid.

Josh

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