UP/SMP difference in IRQ_STAT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Please consider the following definitions from include/linux/irq_cpustat.h
--------------------------
#ifdef CONFIG_SMP
#define __IRQ_STAT(cpu, member)	(irq_stat[cpu].member)
#else
#define __IRQ_STAT(cpu, member)	((void)(cpu), irq_stat[0].member)
#endif	

  /* arch independent irq_stat fields */
#define softirq_pending(cpu)	__IRQ_STAT((cpu), __softirq_pending)
#define local_irq_count(cpu)	__IRQ_STAT((cpu), __local_irq_count)
-----------------------------

Why __IRQ_STAT is defined differently for UP and SMP ?. Because of this
I am not able to use local_irq_count() and such things as Lvalues under UP.
(like local_irq_count(cpu) = 0)

Regards,
Bharata.
-- 
Bharata B Rao,
IBM Linux Technology Center,
IBM Software Lab, Bangalore.

Ph: 91-80-5044962
Mail: bharata@in.ibm.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux