aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorPaul Guyot <[email protected]>2010-10-03 18:04:55 +0200
committerRickard Green <[email protected]>2010-11-18 11:42:58 +0100
commit667409afe4f909d18f6e19e6ca5a65a4848e51d6 (patch)
treec52a954b74095a3d7e11f2401e4a8e8ffe50875d /erts/configure.in
parentf21f0fa7d7ab6d5db573f06191a93aed6477b01b (diff)
downloadotp-667409afe4f909d18f6e19e6ca5a65a4848e51d6.tar.gz
otp-667409afe4f909d18f6e19e6ca5a65a4848e51d6.tar.bz2
otp-667409afe4f909d18f6e19e6ca5a65a4848e51d6.zip
Add support for CPU affinity & topology detection on FreeBSD 8
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 8c6f2ac076..08498dad29 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -1852,6 +1852,27 @@ if test $processor_bind_functionality = yes; then
AC_DEFINE(HAVE_PROCESSOR_BIND, 1, [Define if you have processor_bind functionality])
fi
+AC_MSG_CHECKING([for cpuset_getaffinity/cpuset_setaffinity])
+AC_TRY_COMPILE([
+#include <sys/param.h>
+#include <sys/cpuset.h>
+],
+[
+ int res;
+ cpuset_t cpuset;
+ CPU_ZERO(&cpuset);
+ CPU_SET(1, &cpuset);
+ res = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset_t), &cpuset);
+ res = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset_t), &cpuset);
+ res = CPU_ISSET(1, &cpuset);
+ CPU_CLR(1, &cpuset);
+],
+ cpuset_xetaffinity=yes,
+ cpuset_xetaffinity=no)
+AC_MSG_RESULT([$cpuset_xetaffinity])
+if test $cpuset_xetaffinity = yes; then
+ AC_DEFINE(HAVE_CPUSET_xETAFFINITY, 1, [Define if you have cpuset_getaffinity/cpuset_setaffinity])
+fi
AC_CACHE_CHECK([for 'end' symbol],
erts_cv_have_end_symbol,