actions: list: Add `for_each_action_{const, mutable}()` macros
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 23 Jun 2021 16:33:18 +0000 (12:33 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 1 Jun 2023 14:10:05 +0000 (10:10 -0400)
commit2460203ad4c64f0dcdb716e833abee10a79ec092
tree48fda526777d02309534b1c071c860632c9f9f0c
parentdc88217e78259cb6b35fbaf6b85ad5aed6a37023
actions: list: Add `for_each_action_{const, mutable}()` macros

Accessing all the inner actions of a action list in a loop is a common
access pattern. This commit adds 2 `for_each` macros to iterate over all
elements either using a const or a mutable pointer.

Add a few unit tests for the list action to test these macros.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9aff0b81e1f782b5d20c3fcb82ee7028da8dd810
.clang-format
include/lttng/action/list-internal.hpp
src/bin/lttng-sessiond/action-executor.cpp
src/bin/lttng-sessiond/notification-thread-events.cpp
src/bin/lttng/commands/list_triggers.cpp
tests/regression/tools/trigger/utils/Makefile.am
tests/regression/tools/trigger/utils/notification-client.c [deleted file]
tests/regression/tools/trigger/utils/notification-client.cpp [new file with mode: 0644]
tests/unit/test_action.cpp
This page took 0.025305 seconds and 4 git commands to generate.