LTTng ring buffer clients: expect void pointer as private data to create channel
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 3 Feb 2020 19:09:12 +0000 (14:09 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 18 Nov 2020 18:01:28 +0000 (13:01 -0500)
Triggers will create a channel without using the lttng_channel objects,
so allow any type of private data.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I0725616c84e401c9fcbf00a405a2e2d0f1078979

include/lttng/events.h
src/lttng-ring-buffer-client.h
src/lttng-ring-buffer-metadata-client.h

index ae0c9738c426ff215113ce786d97493e56d2b0ef..06bde3207bfa0bc693b4d5380b3e6b0e93d80cc6 100644 (file)
@@ -369,7 +369,7 @@ struct lttng_enabler *lttng_event_enabler_as_enabler(
 
 struct lttng_channel_ops {
        struct channel *(*channel_create)(const char *name,
-                               struct lttng_channel *lttng_chan,
+                               void *priv,
                                void *buf_addr,
                                size_t subbuf_size, size_t num_subbuf,
                                unsigned int switch_timer_interval,
index fa0b8d4709d2e4122edd654c77770d4ed3d64bdb..4f8699c0227aa7c844d3e3db6ef3c33e32f32bea 100644 (file)
@@ -550,11 +550,12 @@ void lttng_channel_destroy(struct channel *chan)
 
 static
 struct channel *_channel_create(const char *name,
-                               struct lttng_channel *lttng_chan, void *buf_addr,
+                               void *priv, void *buf_addr,
                                size_t subbuf_size, size_t num_subbuf,
                                unsigned int switch_timer_interval,
                                unsigned int read_timer_interval)
 {
+       struct lttng_channel *lttng_chan = priv;
        struct channel *chan;
 
        chan = channel_create(&client_config, name, lttng_chan, buf_addr,
index 12fcd914969d12d781a8396334d2ff6352d499fc..6fa0c2b1f55dfc0dc219b9ac0baa2549191c27e8 100644 (file)
@@ -237,11 +237,12 @@ void lttng_channel_destroy(struct channel *chan)
 
 static
 struct channel *_channel_create(const char *name,
-                               struct lttng_channel *lttng_chan, void *buf_addr,
+                               void *priv, void *buf_addr,
                                size_t subbuf_size, size_t num_subbuf,
                                unsigned int switch_timer_interval,
                                unsigned int read_timer_interval)
 {
+       struct lttng_channel *lttng_chan = priv;
        struct channel *chan;
 
        chan = channel_create(&client_config, name,
This page took 0.028573 seconds and 4 git commands to generate.