From: Joshua Stewart <joshua.stewart@comcast.net>
To: linux-kernel@vger.kernel.org
Subject: A little explanation needed
Date: Sun, 22 Dec 2002 00:36:32 -0500 [thread overview]
Message-ID: <1040535392.1518.3.camel@localhost.localdomain> (raw)
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
next reply other threads:[~2002-12-22 5:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-22 5:36 Joshua Stewart [this message]
2002-12-22 5:35 ` A little explanation needed Greg KH
2002-12-22 21:07 ` Joshua Stewart
2002-12-22 20:12 ` DervishD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1040535392.1518.3.camel@localhost.localdomain \
--to=joshua.stewart@comcast.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.