Results 1 to 5 of 5
can anyone please help me with the code for how to identify the current CPU in IA64 2.6.x kernel in SLES 10...
- 04-08-2008 #1Just Joined!
- Join Date
- Apr 2008
- Posts
- 6
how the current CPU is identified in IA64 2.6.X kernel
can anyone please help me with the code for how to identify the current CPU in IA64 2.6.x kernel in SLES 10
- 04-08-2008 #2Linux Newbie
- Join Date
- Mar 2008
- Location
- Hyderabad
- Posts
- 109
What are you really looking for?
If you are developing a kernel module then
smp_processor_id() is the function.
- 04-09-2008 #3Just Joined!
- Join Date
- Apr 2008
- Posts
- 6
I dont want to include smp.h header in which this smp_processor_id() function is defined as including that is throwing errors..
I have written this code:
#include<linux/smp.h>
int main()
{
unsigned int a;
a=get_cpu();
return 0;
}
It is throwing errors related to linux header files in /usr/include...
how can I get rid of this compilation error??
If any patch is available for this please let me know
Also, if we can get current cpuid by some other means so as to avoid these errors, please tell me
- 04-09-2008 #4Linux Newbie
- Join Date
- Mar 2008
- Location
- Hyderabad
- Posts
- 109
How are you compiling???
- 04-09-2008 #5Just Joined!
- Join Date
- Apr 2008
- Posts
- 6
I am compiling by giving g++ example.cpp(the file in which i have written the same piece of code) gcc version is 4.1.0


Reply With Quote
