Rename C++ header files to .hpp
[lttng-tools.git] / src / bin / lttng-sessiond / event.cpp
index 284a8c472b44012ab7fb4b5948c1aac5b665f710..797219dff8cf893be2c5055b6026aea15e3a2b3a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011 EfficiOS Inc.
  * Copyright (C) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * SPDX-License-Identifier: GPL-2.0-only
 #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.
@@ -471,6 +471,7 @@ static int agent_enable(struct agent *agt,
        LTTNG_ASSERT(event);
        LTTNG_ASSERT(agt);
 
+       rcu_read_lock();
        aevent = agent_find_event(event->name, event->loglevel_type,
                        event->loglevel, filter_expression, agt);
        if (!aevent) {
@@ -519,6 +520,7 @@ error:
                agent_destroy_event(aevent);
        }
 end:
+       rcu_read_unlock();
        free(filter);
        free(filter_expression);
        return ret;
This page took 0.024339 seconds and 4 git commands to generate.