lkml.org 
[lkml]   [2009]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectstrange code in include/linux/kernel_stat.h
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



\
 
 \ /
  Last update: 2009-03-27 11:35    [W:0.326 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site