diff options
author | Kamil Rytarowski <n54@gmx.com> | 2016-01-23 14:35:57 +0300 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2016-01-23 14:35:57 +0300 |
commit | a31f7877defd21d01d048f07f2e8dbe8fe7615e7 (patch) | |
tree | adfeaed3e7f2ef2dfc42cd35cf7929c732f20f14 /build.sh | |
parent | d4e0b664660faf432a693794d27c9a57f75d79e5 (diff) |
NetBSD: Add support for retrieving the number of available CPUs
$ uname
NetBSD
$ getconf NPROCESSORS_ONLN
2
$ getconf _NPROCESSORS_ONLN
getconf: _NPROCESSORS_ONLN: unknown variable
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -220,6 +220,8 @@ build_native_corert() # processors available to a single process. if [ `uname` = "FreeBSD" ]; then NumProc=`sysctl hw.ncpu | awk '{ print $2+1 }'` + elif [ `uname` = "NetBSD" ]; then + NumProc=$(($(getconf NPROCESSORS_ONLN)+1)) else NumProc=$(($(getconf _NPROCESSORS_ONLN)+1)) fi |