gpt4 book ai didi

c - asm/timex.h 和 get_cycles() 去哪儿了?

转载 作者:太空狗 更新时间:2023-10-29 12:22:16 26 4
gpt4 key购买 nike

在较旧的 Linux 发行版中,我可以在包含 asm/timex.h 后调用 get_cycle()。现在我换成Kubuntu 9.04 没有asm/timex.h,再加上sys/timex.h里面没有get_cycle()。有谁知道为什么会发生这种变化,如何访问此功能/宏或替代它?或者,更好的是,在哪里可以阅读相关信息?

最佳答案

/usr/src/linux-headers-2.6.24-23-generic/include/asm$ grep get_cycle *.hsystem_32.h: * (or get_cycles or vread that possibly accesses the TSC) in a definedsystem_64.h: * (or get_cycles or vread that possibly accesses the TSC) in a definedtsc.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);

所以,尝试包含

关于c - asm/timex.h 和 get_cycles() 去哪儿了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/676939/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com