From: Remi Gacogne Date: Fri, 1 Apr 2022 14:46:44 +0000 (+0200) Subject: dnsdist: Add DISABLE_FALSE_SHARING_PADDING option X-Git-Tag: rec-4.7.0-beta1~7^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12b9a1f01d7340dfafc4e52a17fc8068cfc4e77b;p=thirdparty%2Fpdns.git dnsdist: Add DISABLE_FALSE_SHARING_PADDING option --- diff --git a/pdns/stat_t.hh b/pdns/stat_t.hh index d318c980b2..389a62676b 100644 --- a/pdns/stat_t.hh +++ b/pdns/stat_t.hh @@ -23,6 +23,7 @@ #include +#ifndef DISABLE_FALSE_SHARING_PADDING #define CPU_LEVEL1_DCACHE_LINESIZE 64 // Until we know better via configure/getconf namespace pdns { @@ -77,3 +78,12 @@ namespace pdns { typedef stat_t_trait stat32_t; typedef stat_t_trait stat16_t; } +#else +namespace pdns { + using stat_t = std::atomic; + using stat32_t = std::atomic; + using stat16_t = std::atomic; + template + using stat_t_trait = std::atomic; +} +#endif