urcu: add lfht_iteration_adapter helper
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 17 Jul 2024 20:39:54 +0000 (20:39 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Jul 2024 01:26:51 +0000 (01:26 +0000)
commitef2f8a02adc70fba061f88381a3d477fa78ba3be
tree8b35acf6ea6c583bbde42a787cbe78bf4d0b4602
parentf3985622a1e68d7a9250e3a3403c33029ebc6f03
urcu: add lfht_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 all of the
elements of an lfht without using those macros. Those iterations are the
main reason such warnings are emitted. The interface of
lfht_iteration_adapter also allows the use of ranged-for loops.

Change-Id: I61906e025bd0dd7512f02180700f3ddb3c9cf3ca
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/save.cpp
src/bin/lttng-sessiond/snapshot.cpp
src/bin/lttng-sessiond/snapshot.hpp
src/common/hashtable/hashtable.cpp
src/common/hashtable/hashtable.hpp
src/common/urcu.hpp
This page took 0.025156 seconds and 4 git commands to generate.