static void free_stream_rcu(struct rcu_head *head)
{
struct lttng_ht_node_u64 *node =
- caa_container_of(head, struct lttng_ht_node_u64, head);
+ lttng::utils::container_of(head, <tng_ht_node_u64::head);
struct lttng_consumer_stream *stream =
- caa_container_of(node, struct lttng_consumer_stream, node);
+ lttng::utils::container_of(node, <tng_consumer_stream::node);
pthread_mutex_destroy(&stream->lock);
free(stream);
int ret;
struct lttng_consumer_stream *stream;
- stream = (lttng_consumer_stream *) zmalloc(sizeof(*stream));
+ stream = zmalloc<lttng_consumer_stream>();
if (stream == NULL) {
PERROR("malloc struct lttng_consumer_stream");
ret = -ENOMEM;
if (stream->globally_visible) {
pthread_mutex_lock(&the_consumer_data.lock);
pthread_mutex_lock(&stream->chan->lock);
+
pthread_mutex_lock(&stream->lock);
/* Remove every reference of the stream in the consumer. */
consumer_stream_delete(stream, ht);
+
destroy_close_stream(stream);
/* Update channel's refcount of the stream. */