projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: replace container_of with a C++ safe implementation
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
consumer.cpp
diff --git
a/src/bin/lttng-sessiond/consumer.cpp
b/src/bin/lttng-sessiond/consumer.cpp
index b87e1d73d2d065ef21ee19c4a015b2c00946c396..c0f8eb5894e8fae8cb070109d4820ebec62ddff2 100644
(file)
--- a/
src/bin/lttng-sessiond/consumer.cpp
+++ b/
src/bin/lttng-sessiond/consumer.cpp
@@
-414,7
+414,7
@@
struct consumer_socket *consumer_find_socket(int key,
&iter);
node = lttng_ht_iter_get_node_ulong(&iter);
if (node != NULL) {
&iter);
node = lttng_ht_iter_get_node_ulong(&iter);
if (node != NULL) {
- socket =
caa_container_of(node, struct consumer_socket,
node);
+ socket =
lttng::utils::container_of(node, &consumer_socket::
node);
}
return socket;
}
return socket;
@@
-481,9
+481,9
@@
void consumer_del_socket(struct consumer_socket *sock,
static void destroy_socket_rcu(struct rcu_head *head)
{
struct lttng_ht_node_ulong *node =
static void destroy_socket_rcu(struct rcu_head *head)
{
struct lttng_ht_node_ulong *node =
-
caa_container_of(head, struct lttng_ht_node_ulong,
head);
+
lttng::utils::container_of(head, <tng_ht_node_ulong::
head);
struct consumer_socket *socket =
struct consumer_socket *socket =
-
caa_container_of(node, struct consumer_socket,
node);
+
lttng::utils::container_of(node, &consumer_socket::
node);
free(socket);
}
free(socket);
}
@@
-566,7
+566,7
@@
void consumer_destroy_output_sockets(struct consumer_output *obj)
static void consumer_release_output(struct urcu_ref *ref)
{
struct consumer_output *obj =
static void consumer_release_output(struct urcu_ref *ref)
{
struct consumer_output *obj =
-
caa_container_of(ref, struct consumer_output,
ref);
+
lttng::utils::container_of(ref, &consumer_output::
ref);
consumer_destroy_output_sockets(obj);
consumer_destroy_output_sockets(obj);
This page took
0.023722 seconds
and
4
git commands to generate.