lkml.org 
[lkml]   [2002]   [Dec]   [22]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateSun, 22 Dec 2002 00:36:32 -0500
FromJoshua Stewart <>
SubjectA little explanation needed
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/

\
 
 \ /
  Last update: 2005-03-22 11:31    [W:0.229 / U:0.450 seconds]
©2003-2008 Jasper Spaans