ir: trace: pass remove listeners when adding listeners
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 21 Jul 2017 20:13:16 +0000 (16:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 21 Aug 2017 21:02:22 +0000 (17:02 -0400)
commit9962ad4bc65d2dc5800bb9e186cac6f54f2e430a
tree27b66d28e6a0611afa726086e56b0660db671c5f
parentf8149f00bd3a9a9a601131b571afad84ae0ca53a
ir: trace: pass remove listeners when adding listeners

With this patch, when you call bt_ctf_trace_add_is_static_listener(),
you can also provide a "remove listener" which is called when the added
listener is removed, weither manually with
bt_ctf_trace_remove_is_static_listener(), or when the trace object is
destroyed. This is useful when you dynamically allocate data only for
the listener to add and you are not the only owner of the trace object:
the remove listener is where to free/release this data.

Existing plugins and tests are modified to match and test this change.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/ctf-ir/trace-internal.h
include/babeltrace/ctf-ir/trace.h
lib/ctf-ir/trace.c
plugins/ctf/fs-sink/write.c
plugins/lttng-utils/copy.c
tests/lib/test_ctf_writer.c
This page took 0.024905 seconds and 4 git commands to generate.