linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A little explanation needed
@ 2002-12-22  5:36 Joshua Stewart
  2002-12-22  5:35 ` Greg KH
  2002-12-22 20:12 ` DervishD
  0 siblings, 2 replies; 4+ messages in thread
From: Joshua Stewart @ 2002-12-22  5:36 UTC (permalink / raw)
  To: linux-kernel


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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-12-22 20:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-22  5:36 A little explanation needed Joshua Stewart
2002-12-22  5:35 ` Greg KH
2002-12-22 21:07   ` Joshua Stewart
2002-12-22 20:12 ` DervishD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).