diff --git a/.clang-format b/.clang-format index 4aac13c8b7..6a8388bc91 100644 --- a/.clang-format +++ b/.clang-format @@ -34,6 +34,10 @@ PointerAlignment: Right PointerBindsToType: false IncludeBlocks: Regroup IncludeCategories: + - Regex: '^<(urcu\.h|urcu/urcu-|urcu-)' + Priority: 2 + - Regex: '^' - Priority: 1 - - Regex: '".*"' - Priority: 9 + Priority: 100 + - Regex: ']]) AX_RESTORE_FLAGS([libuv]) +# userspace-rcu (QSBR variant) +PKG_CHECK_MODULES([LIBURCU], [liburcu-qsbr liburcu-cds]) + # [pairwise: --enable-doh --with-libnghttp2=auto, --enable-doh --with-libnghttp2=yes, --disable-doh] AC_ARG_ENABLE([doh], [AS_HELP_STRING([--disable-doh], [disable DNS over HTTPS, removes dependency on libnghttp2 (default is --enable-doh)])], diff --git a/doc/arm/build.inc.rst b/doc/arm/build.inc.rst index 93a08ecadc..f47ca5d651 100644 --- a/doc/arm/build.inc.rst +++ b/doc/arm/build.inc.rst @@ -56,6 +56,7 @@ Required Libraries To build BIND 9, the following packages must be installed: - ``libcrypto``, ``libssl`` +- ``liburcu`` - ``libuv`` - ``perl`` - ``pkg-config`` / ``pkgconfig`` / ``pkgconf`` @@ -73,6 +74,9 @@ in a nonstandard location, specify the prefix using PKCS#11 hardware service module for cryptographic operations, ``engine_pkcs11`` from the OpenSC project must be compiled and used. +The Userspace RCU library ``liburcu`` (https://liburcu.org/) is used +for lock-free data structures and concurrent safe memory reclamation. + On Linux, process capabilities are managed in user space using the ``libcap`` library (https://git.kernel.org/pub/scm/libs/libcap/libcap.git/), which can be diff --git a/lib/isc/Makefile.am b/lib/isc/Makefile.am index 8e88e69311..e822b73452 100644 --- a/lib/isc/Makefile.am +++ b/lib/isc/Makefile.am @@ -212,6 +212,7 @@ endif USE_ISC_RWLOCK libisc_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(LIBISC_CFLAGS) \ + $(LIBURCU_CFLAGS) \ $(LIBUV_CFLAGS) \ $(OPENSSL_CFLAGS) \ $(ZLIB_CFLAGS) @@ -221,6 +222,7 @@ libisc_la_LDFLAGS = \ -release "$(PACKAGE_VERSION)" libisc_la_LIBADD = \ + $(LIBURCU_LIBS) \ $(LIBUV_LIBS) \ $(OPENSSL_LIBS) \ $(ZLIB_LIBS)