std: Remove has_cpuid
The one use of it was guaranteed to be always true.
This commit is contained in:
parent
425ae69588
commit
2f0aaaf2b9
2 changed files with 0 additions and 12 deletions
|
@ -269,10 +269,6 @@
|
||||||
#![cfg_attr(any(windows, target_os = "uefi"), feature(round_char_boundary))]
|
#![cfg_attr(any(windows, target_os = "uefi"), feature(round_char_boundary))]
|
||||||
#![cfg_attr(target_family = "wasm", feature(stdarch_wasm_atomic_wait))]
|
#![cfg_attr(target_family = "wasm", feature(stdarch_wasm_atomic_wait))]
|
||||||
#![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))]
|
#![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))]
|
||||||
#![cfg_attr(
|
|
||||||
all(any(target_arch = "x86_64", target_arch = "x86"), target_os = "uefi"),
|
|
||||||
feature(stdarch_x86_has_cpuid)
|
|
||||||
)]
|
|
||||||
//
|
//
|
||||||
// Language features:
|
// Language features:
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
|
|
|
@ -175,10 +175,6 @@ pub(crate) mod instant_internal {
|
||||||
|
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
fn timestamp_rdtsc() -> Option<Duration> {
|
fn timestamp_rdtsc() -> Option<Duration> {
|
||||||
if !crate::arch::x86_64::has_cpuid() {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new();
|
static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new();
|
||||||
|
|
||||||
// Get Frequency in Mhz
|
// Get Frequency in Mhz
|
||||||
|
@ -200,10 +196,6 @@ pub(crate) mod instant_internal {
|
||||||
|
|
||||||
#[cfg(target_arch = "x86")]
|
#[cfg(target_arch = "x86")]
|
||||||
fn timestamp_rdtsc() -> Option<Duration> {
|
fn timestamp_rdtsc() -> Option<Duration> {
|
||||||
if !crate::arch::x86::has_cpuid() {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new();
|
static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new();
|
||||||
|
|
||||||
let freq = FREQUENCY
|
let freq = FREQUENCY
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue