2021-07-21 16:32:03 -04:00
|
|
|
# This script outputs the number of available processors/cores plus one.
|
|
|
|
|
|
|
|
case `uname` in
|
|
|
|
Linux)
|
|
|
|
wxPROC_COUNT=`nproc`
|
|
|
|
;;
|
|
|
|
|
2022-06-23 10:26:36 -04:00
|
|
|
Darwin|FreeBSD)
|
2021-07-21 16:32:03 -04:00
|
|
|
wxPROC_COUNT=`sysctl -n hw.ncpu`
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
wxPROC_COUNT=0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
((wxPROC_COUNT++))
|
|
|
|
echo $wxPROC_COUNT
|