urcu: add lfht_filtered_iteration_adapter helper
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 29 Jul 2024 20:23:47 +0000 (20:23 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Jul 2024 18:26:44 +0000 (14:26 -0400)
commit8d1de59a75d02123cfd69e3e18dd841c688881fe
treec34e11cbd5ebd70cd6ee98c9def45ccb69567b67
parentc3ade1337c8122ce18a1ffaa181843220f1cbe29
urcu: add lfht_filtered_iteration_adapter helper

The urcu lfht macros often make use of caa_container_of (and other equivalent
variations) which use offsetof. Unfortunately, offsetof is conditionally
supported by compilers for non-POD types.

The tree already has lttng::utils::container_of to work around this
problem. This new utils makes it possible to iterate on the
elements of an lfht that match a given key without using those macros. Those iterations are the
main reason such warnings are emitted. The interface of
lfht_filtered_iteration_adapter also allows the use of ranged-for loops.

Change-Id: I9acd3fa9f6523de8006bc9107bcca6b6b654d6fa
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/urcu.hpp
This page took 0.02555 seconds and 4 git commands to generate.