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>
Fri, 11 Aug 2017 22:54:15 +0000 (18:54 -0400)
commit8480c8cc7e985169ab42060d3cd3c72d6c8d240d
tree8211f0cb642411e9c3dae8281cb9a800172cf956
parentcece3abe02946bcd17000568d1c99212148539de
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.024835 seconds and 4 git commands to generate.