aboutsummaryrefslogtreecommitdiffstats
path: root/erts/lib_src
diff options
context:
space:
mode:
authorHolger Weiß <[email protected]>2011-06-07 01:37:20 +0200
committerHolger Weiß <[email protected]>2011-06-07 12:48:19 +0200
commite68fde947e540c38366d6888dfd6945efb49a880 (patch)
tree3bbb42fa38dfefab90bb98fe2af3a13ee31c7dbc /erts/lib_src
parentf6a77186a608fb08e2ffc65d06c4166b7127e4a0 (diff)
downloadotp-e68fde947e540c38366d6888dfd6945efb49a880.tar.gz
otp-e68fde947e540c38366d6888dfd6945efb49a880.tar.bz2
otp-e68fde947e540c38366d6888dfd6945efb49a880.zip
Detect the available CPUs on IRIX
Add support for querying the number of configured and online processors on SGI systems running IRIX.
Diffstat (limited to 'erts/lib_src')
-rw-r--r--erts/lib_src/common/erl_misc_utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/lib_src/common/erl_misc_utils.c b/erts/lib_src/common/erl_misc_utils.c
index 5dbf98c7d1..0871ece0b0 100644
--- a/erts/lib_src/common/erl_misc_utils.c
+++ b/erts/lib_src/common/erl_misc_utils.c
@@ -55,6 +55,12 @@
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
+# if defined(_SC_NPROC_CONF) && !defined(_SC_NPROCESSORS_CONF)
+# define _SC_NPROCESSORS_CONF _SC_NPROC_CONF
+# endif
+# if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN)
+# define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN
+# endif
# if (defined(NO_SYSCONF) || !defined(_SC_NPROCESSORS_CONF))
# ifdef HAVE_SYS_SYSCTL_H
# include <sys/sysctl.h>