2009-03-24 7 views
2

Dans une ancienne distribution Linux, je pouvais appeler get_cycle() après avoir inclus asm/timex.h. Maintenant, je suis passé à Kubuntu 9.04 et il n'y a pas asm/timex.h, plus dans sys/timex.h il n'y a pas de get_cycle(). Est-ce que quelqu'un sait pourquoi cela a changé, comment accéder à cette fonction/macro ou un remplacement pour cela? Ou, encore mieux, où lire des informations à ce sujet?Où est passé asm/timex.h et get_cycles()?

Répondre

1
 
/usr/src/linux-headers-2.6.24-23-generic/include/asm$ grep get_cycle *.h 
system_32.h: * (or get_cycles or vread that possibly accesses the TSC) in a defined 
system_64.h: * (or get_cycles or vread that possibly accesses the TSC) in a defined 
tsc.h:static inline cycles_t get_cycles(void) 
tsc.h:static inline cycles_t vget_cycles(void) 
vmi_time.h:  u64 (*get_cycle_frequency)(void); 
vmi_time.h:  u64 (*get_cycle_counter)(int); 

Alors, essayez d'inclure <tsc.h>.

+0

Merci, cela a fonctionné. J'ai seulement grepped à l'intérieur de/usr/include ... – Chris

1

Il devrait être sous asm-i386/timex.h

0

/usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/tsc.h