Merge branch 'main' of codeberg.org:Caznix/Zenyx

This commit is contained in:
Chance 2025-04-11 14:50:52 -04:00
commit 1a0eadbc14

View file

@ -382,10 +382,16 @@ impl CPU {
let logical_cores = cpu_opt.map(|_| sys.cpus().len() as u8); let logical_cores = cpu_opt.map(|_| sys.cpus().len() as u8);
let physical_cores = System::physical_core_count().map(|pc| pc as u8); let physical_cores = System::physical_core_count().map(|pc| pc as u8);
let cpuid = CpuId::new();
let mut l1_cache = None; let mut l1_cache = None;
let mut l2_cache = None; let mut l2_cache = None;
let mut l3_cache = None; let mut l3_cache = None;
#[cfg(any(
all(target_arch = "x86", not(target_env = "sgx"), target_feature = "sse"),
all(target_arch = "x86_64", not(target_env = "sgx"))
))]
{
let cpuid = CpuId::new();
if let Some(iter) = cpuid.get_cache_parameters() { if let Some(iter) = cpuid.get_cache_parameters() {
for cache in iter { for cache in iter {
match cache.level() { match cache.level() {
@ -417,6 +423,7 @@ impl CPU {
} }
} }
} }
}
Self { Self {
brand, brand,