*/
#define _LGPL_SOURCE
-#include <common/common.h>
-#include <common/index/index.h>
-#include <common/compat/string.h>
-#include <common/utils.h>
+#include <common/common.hpp>
+#include <common/index/index.hpp>
+#include <common/compat/string.hpp>
+#include <common/utils.hpp>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <algorithm>
-#include "lttng-relayd.h"
-#include "viewer-stream.h"
+#include "lttng-relayd.hpp"
+#include "viewer-stream.hpp"
static void viewer_stream_release_composite_objects(struct relay_viewer_stream *vstream)
{
static void viewer_stream_destroy_rcu(struct rcu_head *head)
{
struct relay_viewer_stream *vstream =
- caa_container_of(head, struct relay_viewer_stream, rcu_node);
+ lttng::utils::container_of(head, &relay_viewer_stream::rcu_node);
viewer_stream_destroy(vstream);
}
ASSERT_LOCKED(stream->lock);
- vstream = (relay_viewer_stream *) zmalloc(sizeof(*vstream));
+ vstream = zmalloc<relay_viewer_stream>();
if (!vstream) {
PERROR("relay viewer stream zmalloc");
goto error;
DBG("Relay viewer stream %" PRIu64 " not found", id);
goto end;
}
- vstream = caa_container_of(node, struct relay_viewer_stream, stream_n);
+ vstream = lttng::utils::container_of(node, &relay_viewer_stream::stream_n);
if (!viewer_stream_get(vstream)) {
vstream = NULL;
}