A little explanation needed

From: Joshua Stewart (joshua.stewart@comcast.net)
Date: Sun Dec 22 2002 - 00:36:32 EST


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/



This archive was generated by hypermail 2b29 : Mon Dec 23 2002 - 22:00:30 EST