Rename C++ header files to .hpp
[lttng-tools.git] / src / bin / lttng-sessiond / snapshot.cpp
index 44928edb06aaa78b13198fd7f4811fb3870155f3..f7821da95da978ac54f1111d7622a4080e8b31ca 100644 (file)
 #include <string.h>
 #include <urcu/uatomic.h>
 
-#include <common/defaults.h>
+#include <common/defaults.hpp>
 
-#include "snapshot.h"
-#include "utils.h"
+#include "snapshot.hpp"
+#include "utils.hpp"
 
 /*
  * Return the atomically incremented value of next_output_id.
@@ -241,6 +241,7 @@ struct snapshot_output *snapshot_find_output_by_name(const char *name,
 
        LTTNG_ASSERT(snapshot);
        LTTNG_ASSERT(name);
+       ASSERT_RCU_READ_LOCKED();
 
        cds_lfht_for_each_entry(snapshot->output_ht->ht, &iter.iter, output,
                node.node) {
@@ -267,6 +268,7 @@ struct snapshot_output *snapshot_find_output_by_id(uint32_t id,
        struct snapshot_output *output = NULL;
 
        LTTNG_ASSERT(snapshot);
+       ASSERT_RCU_READ_LOCKED();
 
        lttng_ht_lookup(snapshot->output_ht, (void *)((unsigned long) id), &iter);
        node = lttng_ht_iter_get_node_ulong(&iter);
This page took 0.026891 seconds and 4 git commands to generate.