aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-02-23 20:04:30 +0100
committerRickard Green <[email protected]>2014-02-23 20:04:30 +0100
commitb2017b91a5572f7bc2caf15082b4b105f3a3e21d (patch)
tree4f4ea3d654467043895a613b45b40f27f1a9d476 /erts/configure.in
parentdb911c1f15372d2dadf06e8502506b0936a4fbb3 (diff)
downloadotp-b2017b91a5572f7bc2caf15082b4b105f3a3e21d.tar.gz
otp-b2017b91a5572f7bc2caf15082b4b105f3a3e21d.tar.bz2
otp-b2017b91a5572f7bc2caf15082b4b105f3a3e21d.zip
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 02e5d12918..d71a264066 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