Complete removal of urcu-signal flavor This commit completes removal of the urcu-signal flavor. Users can migrate to liburcu-memb with a kernel implementing the membarrier(2) system call to have similar read-side performance without requiring use of a reserved signal, and with improved grace period performance. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Change-Id: I75b9171e705b9b2ef4c8eeabe6164e5587816fb4
Add cmm_emit_legacy_smp_mb() Some public APIs stipulate implicit memory barriers on operations. These were coherent with the memory model used at that time. However, with the migration to a memory model closer to the C11 memory model, these memory barriers are not strictly emitted by the atomic operations in the new memory model. Therefore, introducing the `--disable-legacy-mb' configuration option. By default, liburcu is configured to emit these legacy memory barriers, thus keeping backward compatibility at the expense of slower performances. However, users can opt-out by disabling the legacy memory barriers. This options is publicly exported in the system configuration header file and can be overrode manually on a compilation unit basis by defining `CONFIG_RCU_EMIT_LEGACY_MB' before including any liburcu files. The usage of this macro requires to re-write atomic operations in term of the CMM memory model. This is done for the queue and stack APIs. Change-Id: Ia5ce3b3d8cd1955556ce96fa4408a63aa098a1a6 Signed-off-by: Olivier Dion <odion@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure: Add --enable-compiler-atomic-builtins option If the toolchain supports atomic builtins and the user ask for atomic builtins, use them for the uatomic API. This requires that the toolchains used to compile the library and the user application supports such builtins. The advantage of using these builtins is that they are well known synchronization primitives by several tools such as TSAN. However, they may introduce redundant memory barriers, mainly on strongly ordered architectures. Change-Id: Ia8e97112681f744f17816dbc4cbbec805a483331 Co-authored-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Olivier Dion <odion@efficios.com> Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Build system: use SPDX identifiers The SPDX identifiers [1] are a legally binding shorthand, which can be used instead of the full boiler plate text. This is the first step towards implementing the full REUSE spec [2] to help with copyright and licensing audits and compliance. This will reduce a lot a manual work required for the licensing audit required in Debian on each update. For files that lacked copyright and licensing information, I used the following guidelines. If a clear author could be determined from the git history use it, otherwise use 'EfficiOS Inc.'. For build system files, use 'MIT', for documentation 'CC-BY-4.0' and for data files 'CC-1.0'. [1] https://spdx.org/ids-how [2] https://reuse.software/tutorial/ Change-Id: Ie507130c00b95606dc439616fda4fd9b1d35353d Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix building on MSYS2 Update cygwin libtool config in `configure.ac` to match MSYS2 build environments as well. MSYS2 is also a Windows build environment that produces DLLs. Signed-off-by: Christopher Ng <facboy@gmail.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Change-Id: I48ca648123fd40b8003c72c0447c70a8b4bde6d6
Improved test framework This is based on the babeltrace / librseq test framework with the objective of standardising across projects. Regroup all the configure detected values relevant to the test suite in a single generated file. This file will be automatically sourced by the test suite in most scenarios but can also be sourced in the shell of a user. * All user overridable variables start with 'URCU_TESTS_'. * The priority for variables is : Environment -> env.sh -> utils.sh (defaults). * A user can source 'env.sh', override some of the values and manually run test scripts. * The test suite can run without an 'env.sh' file present. Change-Id: Id94f7085ed1ea0e30207856cf1594ca30585536c Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
fix: add missing pkgconfig file for memb flavour lib We ship a pkg-config file for each urcu flavour library except the latest introduced 'memb'. Change-Id: If222949941d968f63b07616776440931657aa6db Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Build and run regression and unit tests as C++ programs Build and run all tests under tests/regression and tests/unit as C++ programs in addition to C. This helps get confidence that urcu, when used from a C++ program, behaves well. Change-Id: Iacaa42dddbcbf59eff8e327edfd0352cce0b74b7 Signed-off-by: Simon Marchi <simon.marchi@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add serialized ABI definition files This commit contains the serialized ABI definitions for a typical build of the liburcu librairies. This information is extracted using libabigail (https://sourceware.org/libabigail/). The artefacts used to generate these were built with CFLAGS="-O0 -ggdb". You can compare the serialized ABI with a shared object to check for breaking changes. For example, here we compare an in-tree built version of liburcu-memb.so with the serialized ABI of stable-0.13 : abidiff \ extras/abi/0.13/x86_64-pc-linux-gnu/liburcu-memb.so.7.xml \ src/.libs/liburcu-memb.so Change-Id: Icb3145cdf9f69490981ce201ec437cc83298f0a7 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
bump SONAME major to 8 In URCU 0.11, we introduced new symbols to clean up the library symbol namespacing, using the "alias" attribute to keep emitting the old symbols, expecting to preserve ABI backward compatibility. Unfortunately, it turns out that even though it works well for function symbols, it is broken for public global variables due to the way ELF copy relocation works. When building a non-PIC executable that uses an extern variable, a .bss symbol is emitted in the executable. This will take precedence over the symbol implemented within the library in the Global Symbol Table. Unfortunately, the alias within the library will not be aware that the actual GST symbol differs from its alias within the library, and the addresses for the symbol and its alias will differ at runtime. Considering that this compatibility issue affects official library releases, there is little we can do beyond documenting this issue, and bumping the Userspace RCU major soname for the next (0.13) release. Change-Id: I0ca8407dcffd871f025814923c6e329ec260133a Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
fix: we used weak symbols not weak aliases Remove the configure test for weak aliases since we don't use them and they are not supported on macOs. Change-Id: If245dfe02c9ec990e16e1a90983ba9d8f1eb9f4b Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure: enable extended compiler warnings Import the compiler warning flag detection system from Babeltrace and enable extended compiler warnings. Change-Id: Ia3ef4d37640fb3384dc76778ed88d0519f9b7e25 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
fix: add missing 'S' to AC_CHECK_PROGS AC_CHECK_PROG has a different behavior to AC_CHECK_PROGS and won't set the proper variable without further arguments. Change-Id: Ia20c16772a42bc21d7d518095a13f4ad574cb65d Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>