Re: Get number of CPU?

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

 



On 6/27/05, Tetsuo Handa <from-kernelnewbies@xxxxxxxxxxxxxxxxxxx> wrote:
> > Looks like num_online_cpus() is not exported, so it is impossible to
> > use it from a module, isnt it?
> 
> I think it's possible. For example, microcode.c uses
> num_online_cpus() and can compile as a module.
> http://lxr.linux.no/source/arch/i386/kernel/microcode.c#L252
> http://lxr.linux.no/source/arch/i386/kernel/microcode.c#L510

ah, it is defined as a macro, so that is possible to use from a
module. Thanks :-)


Hieu

--
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