From d63f395061b417ef63591f8d1524ab3e912aadc6 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 19 Jan 2022 19:29:29 +0200 Subject: [PATCH] runtime: simplify nr_cpus --- vlib/runtime/runtime_nix.c.v | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vlib/runtime/runtime_nix.c.v b/vlib/runtime/runtime_nix.c.v index a5c69b054..1863546b2 100644 --- a/vlib/runtime/runtime_nix.c.v +++ b/vlib/runtime/runtime_nix.c.v @@ -4,8 +4,5 @@ fn C.sysconf(name int) i64 // nr_cpus returns the number of virtual CPU cores found on the system. pub fn nr_cpus() int { - $if linux || macos || solaris { - return int(C.sysconf(C._SC_NPROCESSORS_ONLN)) - } - return 1 + return int(C.sysconf(C._SC_NPROCESSORS_ONLN)) } -- 2.30.2