aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-11-18 11:47:28 +0100
committerRickard Green <[email protected]>2010-11-18 11:48:47 +0100
commit839dcbfe1285b292c4208c696ceae4b22c46aff7 (patch)
tree71ae1faa8c1cf3f8b31cded6eb2ea71093a4fb29 /erts/configure.in
parentab9932741308ee226173256c1f7a5f6481c33217 (diff)
parent667409afe4f909d18f6e19e6ca5a65a4848e51d6 (diff)
downloadotp-839dcbfe1285b292c4208c696ceae4b22c46aff7.tar.gz
otp-839dcbfe1285b292c4208c696ceae4b22c46aff7.tar.bz2
otp-839dcbfe1285b292c4208c696ceae4b22c46aff7.zip
Merge branch 'pg/freebsd-cpu-affinity-and-topology' into dev
* pg/freebsd-cpu-affinity-and-topology: Add support for CPU affinity & topology detection on FreeBSD 8 OTP-8939
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 6f8d2adb9a..8d629c25ae 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -1858,6 +1858,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,