common: replace container_of with a C++ safe implementation
[lttng-tools.git] / src / bin / lttng-sessiond / event.cpp
index 924df3af175e19bc1e4eedce455ef37487ae0cfa..65b7220ef13603ad1d84f9952e1bde0854dd80de 100644 (file)
 #include <urcu/list.h>
 #include <string.h>
 
-#include <common/compat/errno.h>
+#include <common/compat/errno.hpp>
 #include <lttng/lttng.h>
 #include <lttng/condition/condition.h>
 #include <lttng/condition/event-rule-matches.h>
 #include <lttng/event-rule/event-rule.h>
-#include <lttng/event-rule/event-rule-internal.h>
-#include <common/bytecode/bytecode.h>
-#include <common/error.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-#include <common/filter.h>
-#include <common/context.h>
-
-#include "channel.h"
-#include "event.h"
-#include "kernel.h"
-#include "lttng-sessiond.h"
-#include "lttng-ust-ctl.h"
-#include "lttng-ust-error.h"
-#include "ust-app.h"
-#include "trace-kernel.h"
-#include "trace-ust.h"
-#include "agent.h"
-#include "utils.h"
+#include <lttng/event-rule/event-rule-internal.hpp>
+#include <common/bytecode/bytecode.hpp>
+#include <common/error.hpp>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+#include <common/filter.hpp>
+#include <common/context.hpp>
+
+#include "channel.hpp"
+#include "event.hpp"
+#include "kernel.hpp"
+#include "lttng-sessiond.hpp"
+#include "lttng-ust-ctl.hpp"
+#include "lttng-ust-error.hpp"
+#include "ust-app.hpp"
+#include "trace-kernel.hpp"
+#include "trace-ust.hpp"
+#include "agent.hpp"
+#include "utils.hpp"
 
 /*
  * Add unique UST event based on the event name, filter bytecode and loglevel.
@@ -267,7 +267,7 @@ int event_ust_disable_tracepoint(struct ltt_ust_session *usess,
        }
 
        do {
-               uevent = caa_container_of(node, struct ltt_ust_event, node);
+               uevent = lttng::utils::container_of(node, &ltt_ust_event::node);
                LTTNG_ASSERT(uevent);
 
                if (uevent->enabled == 0) {
@@ -869,7 +869,7 @@ int event_agent_disable(struct ltt_ust_session *usess, struct agent *agt,
        }
 
        do {
-               aevent = caa_container_of(node, struct agent_event, node);
+               aevent = lttng::utils::container_of(node, &agent_event::node);
                ret = event_agent_disable_one(usess, agt, aevent);
 
                if (ret != LTTNG_OK) {
This page took 0.023764 seconds and 4 git commands to generate.