Rename C++ header files to .hpp
[lttng-tools.git] / src / bin / lttng-sessiond / snapshot.cpp
index 03472201acfd3c68a4cdad1937b6b69095248801..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);
@@ -325,5 +327,5 @@ void snapshot_destroy(struct snapshot *obj)
                snapshot_output_destroy(output);
        }
        rcu_read_unlock();
-       ht_cleanup_push(obj->output_ht);
+       lttng_ht_destroy(obj->output_ht);
 }
This page took 0.024747 seconds and 4 git commands to generate.