RE: Question about per_cpu and __get_cpu_var

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

 




In these two macro, what is the "per_cpu__##var"?
TIA


#define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) #define __get_cpu_var(var) per_cpu__##var



Hi, ## is a concatenation operator. So, IF you pass, __get_cpu_var(x), it becomes,

per_cpu_x

It is used for get percpu things.

regards manish

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[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