I wrote a linux driver module (which is on x86_64), I just call rdtsc, but compiler printed:
error: implicit declaration of function 'rdtsc'
Which header file should I include?
I wrote a linux driver module (which is on x86_64), I just call rdtsc, but compiler printed:
error: implicit declaration of function 'rdtsc'
Which header file should I include?
First I saw that you had used the "time" tag for your question. RDTSC is not a good thing to use for time. See Getting cpu cycles using RDTSC - why does the value of RDTSC always increase?
for an excellent explanation.
However if you DO want to use RDTSC functions, the are intel x86 architecture specific and its prototypes are found in linux-source/arch/asm/msr.h