From 2d782164c5c5d412890fbae2d4b72971c3239dc5 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 29 Jul 2022 22:38:30 +0800 Subject: get cpuinfo for bsd --- core/src/xmake/os/cpuinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/xmake/os/cpuinfo.c b/core/src/xmake/os/cpuinfo.c index 618caf15f..e5d27a0f3 100644 --- a/core/src/xmake/os/cpuinfo.c +++ b/core/src/xmake/os/cpuinfo.c @@ -208,8 +208,8 @@ static tb_float_t xm_os_cpuinfo_usagerate() tb_long_t idle = states[CP_IDLE]; tb_trace_i("%ld %ld %ld %ld %ld", user, nice, sys, intr, idle); - tb_int64_t active = user + nice + sys + irq + softirq + steal + guest + guest_nice; - tb_int64_t total = user + nice + sys + idle + iowait + irq + softirq + steal + guest + guest_nice; + tb_int64_t active = user + nice + sys + intr; + tb_int64_t total = user + nice + sys + idle + intr; if (total_prev > 0 && active_prev > 0) { tb_int64_t total_diff = total - total_prev; -- cgit v1.3.1