1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vlib: use new filename format

This commit is contained in:
lutherwenxu
2020-04-12 01:51:32 +08:00
committed by GitHub
parent e64db44bb5
commit dc4db87be3
45 changed files with 0 additions and 26 deletions

View File

@ -0,0 +1,19 @@
module runtime
fn nr_cpus_nix() int {
$if linux {
return int(C.sysconf(C._SC_NPROCESSORS_ONLN))
}
$if macos {
return int(C.sysconf(C._SC_NPROCESSORS_ONLN))
}
$if solaris {
return int(C.sysconf(C._SC_NPROCESSORS_ONLN))
}
return 1
}
fn nr_cpus_win() int {
eprintln('nr_cpus_win should be callable only for windows')
return 1
}