From: Mathieu Desnoyers Date: Mon, 3 Feb 2020 19:09:12 +0000 (-0500) Subject: LTTng ring buffer clients: expect void pointer as private data to create channel X-Git-Tag: v2.13.0-rc1~149 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5cf4b87c1cb473051c17f0a7e1161452ccd5b000;p=lttng-modules.git LTTng ring buffer clients: expect void pointer as private data to create channel Triggers will create a channel without using the lttng_channel objects, so allow any type of private data. Signed-off-by: Mathieu Desnoyers Change-Id: I0725616c84e401c9fcbf00a405a2e2d0f1078979 --- diff --git a/include/lttng/events.h b/include/lttng/events.h index ae0c9738..06bde320 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -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, diff --git a/src/lttng-ring-buffer-client.h b/src/lttng-ring-buffer-client.h index fa0b8d47..4f8699c0 100644 --- a/src/lttng-ring-buffer-client.h +++ b/src/lttng-ring-buffer-client.h @@ -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, diff --git a/src/lttng-ring-buffer-metadata-client.h b/src/lttng-ring-buffer-metadata-client.h index 12fcd914..6fa0c2b1 100644 --- a/src/lttng-ring-buffer-metadata-client.h +++ b/src/lttng-ring-buffer-metadata-client.h @@ -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,