We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f330f8 commit 4341cf5Copy full SHA for 4341cf5
1 file changed
src/tsc_now.rs
@@ -126,9 +126,13 @@ fn clock_source_has_tsc() -> bool {
126
/// we should enable TSC if the system clock source is TSC.
127
#[inline]
128
fn has_invariant_tsc() -> bool {
129
+ #[cfg(target_arch = "x86")]
130
+ use core::arch::x86::__cpuid;
131
+ #[cfg(target_arch = "x86_64")]
132
+ use core::arch::x86_64::__cpuid;
133
+
134
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
135
unsafe {
- use core::arch::x86_64::__cpuid;
136
let cpuid_invariant_tsc_bts = 1 << 8;
137
__cpuid(0x80000000).eax >= 0x80000007
138
&& __cpuid(0x80000007).edx & cpuid_invariant_tsc_bts != 0
0 commit comments