mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
build: Use 'nproc' instead of counting /proc/cpuinfo entries
Change-Id: If3b31504bcd37692ad109bb2779620e2302aa9fa
This commit is contained in:
parent
5323c49fe6
commit
5a1a5de3e3
1 changed files with 6 additions and 7 deletions
|
@ -35,13 +35,12 @@ elsif ($^O eq 'solaris') {
|
|||
$cores = 1 if ($?);
|
||||
}
|
||||
else {
|
||||
if (open CPUINFO, "</proc/cpuinfo") {
|
||||
$cores = scalar grep /^processor/i, <CPUINFO>;
|
||||
close CPUINFO;
|
||||
}
|
||||
else {
|
||||
$cores = 1;
|
||||
}
|
||||
chomp($cores = `/usr/bin/nproc`);
|
||||
$cores = 1 if ($?);
|
||||
# if (open CPUINFO, "</proc/cpuinfo") {
|
||||
# $cores = scalar grep /^processor/i, <CPUINFO>;
|
||||
# close CPUINFO;
|
||||
# }
|
||||
}
|
||||
|
||||
# fork children
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue