#include <urcu/uatomic.h>
#include <unistd.h>
-#include <common/defaults.h>
-#include <common/error.h>
-#include <common/config/session-config.h>
-#include <common/utils.h>
-#include <common/runas.h>
-#include <lttng/save-internal.h>
-
-#include "kernel.h"
-#include "save.h"
-#include "session.h"
-#include "lttng-syscall.h"
-#include "trace-ust.h"
-#include "agent.h"
+#include <common/defaults.hpp>
+#include <common/error.hpp>
+#include <common/config/session-config.hpp>
+#include <common/utils.hpp>
+#include <common/runas.hpp>
+#include <lttng/save-internal.hpp>
+
+#include "kernel.hpp"
+#include "save.hpp"
+#include "session.hpp"
+#include "lttng-syscall.hpp"
+#include "trace-ust.hpp"
+#include "agent.hpp"
/* Return LTTNG_OK on success else a LTTNG_ERR* code. */
static
* Fetch the monitor timer which is located in the parent of
* lttng_ust_channel_attr
*/
- channel = caa_container_of(attr, struct ltt_ust_channel, attr);
+ channel = lttng::utils::container_of(attr, <t_ust_channel::attr);
ret = config_writer_write_element_unsigned_int(writer,
config_element_monitor_timer_interval,
channel->monitor_timer_interval);
rcu_read_lock();
cds_lfht_for_each_entry(events->ht, &iter.iter, node, node) {
- event = caa_container_of(node, struct ltt_ust_event, node);
+ event = lttng::utils::container_of(node, <t_ust_event::node);
if (event->internal) {
/* Internal events must not be exposed to clients */
struct ltt_ust_event fake_event;
memset(&fake_event, 0, sizeof(fake_event));
- agent_event = caa_container_of(node, struct agent_event, node);
+ agent_event = lttng::utils::container_of(node, &agent_event::node);
/*
* Initialize a fake ust event to reuse the same serialization
rcu_read_lock();
cds_lfht_for_each_entry(session->ust_session->domain_global.channels->ht,
&iter.iter, node, node) {
- ust_chan = caa_container_of(node, struct ltt_ust_channel, node);
+ ust_chan = lttng::utils::container_of(node, <t_ust_channel::node);
if (domain == ust_chan->domain) {
ret = save_ust_channel(writer, ust_chan, session->ust_session);
if (ret != LTTNG_OK) {
{
char *uri;
- uri = (char *) zmalloc(PATH_MAX);
+ uri = calloc<char>(PATH_MAX);
if (!uri) {
ret = LTTNG_ERR_NOMEM;
goto end;