aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-02-24 14:14:24 +0100
committerRickard Green <[email protected]>2014-02-24 14:14:24 +0100
commitce614726e9fb19b462ed41a2f020b68ef98cd532 (patch)
treec61534690567d2ad32671e85d46aedbc02041718 /erts/configure.in
parent15c4e79462cd890c2782fc14c9ac9b8cf99ee46f (diff)
parentb2017b91a5572f7bc2caf15082b4b105f3a3e21d (diff)
downloadotp-ce614726e9fb19b462ed41a2f020b68ef98cd532.tar.gz
otp-ce614726e9fb19b462ed41a2f020b68ef98cd532.tar.bz2
otp-ce614726e9fb19b462ed41a2f020b68ef98cd532.zip
Merge branch 'rickard/assumed-cacheline-size/OTP-11742'
* rickard/assumed-cacheline-size/OTP-11742: Introduce configure option --with-assumed-cache-line-size=SIZE
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 51e2e99c88..46e5a15751 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -347,6 +347,25 @@ AS_HELP_STRING([--enable-clock-gettime],
*) clock_gettime_correction=yes ;;
esac ], clock_gettime_correction=unknown)
+AC_ARG_WITH(assumed-cache-line-size,
+AS_HELP_STRING([--with-assumed-cache-line-size=SIZE],
+ [specify assumed cache line size in bytes (valid values are powers of two between and including 16 and 8192; default is 64)]))
+
+dnl Require the assumed cache-line size to be a power of two between 16 and 8192
+case "$with_assumed_cache_line_size" in
+ ""|no|yes)
+ with_assumed_cache_line_size=64;;
+ 16|32|64|128|256|512|1024|2048|4096|8192)
+ ;;
+ *)
+ AC_MSG_ERROR([Invalid assumed cache-line size of $with_assumed_cache_line_size bytes])
+ ;;
+esac
+
+AC_DEFINE_UNQUOTED(ASSUMED_CACHE_LINE_SIZE,
+ $with_assumed_cache_line_size,
+ [Assumed cache-line size (in bytes)])
+
dnl Magic test for clearcase.
OTP_RELEASE=
if test "${ERLANG_COMMERCIAL_BUILD}" != ""; then