From: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
To: LKML <linux-kernel@vger.kernel.org>
Subject: strange code in include/linux/kernel_stat.h
Date: Fri, 27 Mar 2009 12:09:35 +0200 [thread overview]
Message-ID: <49CCA5DF.6040804@movial.com> (raw)
Hi,
Depending on whether the CONFIG_GENERIC_HARDIRQS option is enabled or not, the header file include/linux/kernel_stat.h defines the following two entities:
- the macro kstat_irqs_this_cpu for the case when CONFIG_GENERIC_HARDIRQS is set:
#define kstat_irqs_this_cpu(DESC) \
((DESC)->kstat_irqs[smp_processor_id()])
- another macro with the same name as the macro above but for the case CONFIG_GENERIC_HARDIRQS is not set:
#define kstat_irqs_this_cpu(irq) \
(kstat_this_cpu.irqs[irq])
Apparently, it is assumed that the types for the macro argument are different, and depend on the value of CONFIG_GENERIC_HARDIRQS. Is this intentional?
Thanks,
Dmitri
next reply other threads:[~2009-03-27 10:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 10:09 Dmitri Vorobiev [this message]
2009-04-02 11:05 ` strange code in include/linux/kernel_stat.h Dmitri Vorobiev
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=49CCA5DF.6040804@movial.com \
--to=dmitri.vorobiev@movial.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox