diff options
author | Rickard Green <[email protected]> | 2010-11-18 11:47:28 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-11-18 11:48:47 +0100 |
commit | 839dcbfe1285b292c4208c696ceae4b22c46aff7 (patch) | |
tree | 71ae1faa8c1cf3f8b31cded6eb2ea71093a4fb29 /erts/configure.in | |
parent | ab9932741308ee226173256c1f7a5f6481c33217 (diff) | |
parent | 667409afe4f909d18f6e19e6ca5a65a4848e51d6 (diff) | |
download | otp-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.in | 21 |
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, |