Rename C++ header files to .hpp
[lttng-tools.git] / src / bin / lttng-sessiond / buffer-registry.cpp
index aca8ec1f227f54cc9f8fded46d8924c4b53841be..ca7830a384d8dcca29537fc4e0c724f4216f9f7d 100644 (file)
@@ -8,15 +8,15 @@
 #define _LGPL_SOURCE
 #include <inttypes.h>
 
-#include <common/common.h>
-#include <common/hashtable/utils.h>
+#include <common/common.hpp>
+#include <common/hashtable/utils.hpp>
 
-#include "buffer-registry.h"
-#include "fd-limit.h"
-#include "ust-consumer.h"
-#include "lttng-ust-ctl.h"
-#include "lttng-ust-error.h"
-#include "utils.h"
+#include "buffer-registry.hpp"
+#include "fd-limit.hpp"
+#include "ust-consumer.hpp"
+#include "lttng-ust-ctl.hpp"
+#include "lttng-ust-error.hpp"
+#include "utils.hpp"
 
 /*
  * Set in main.c during initialization process of the daemon. This contains
@@ -185,6 +185,8 @@ struct buffer_reg_uid *buffer_reg_uid_find(uint64_t session_id,
        struct buffer_reg_uid *reg = NULL, key;
        struct lttng_ht *ht = buffer_registry_uid;
 
+       ASSERT_RCU_READ_LOCKED();
+
        /* Setup key we are looking for. */
        key.session_id = session_id;
        key.bits_per_long = bits_per_long;
@@ -574,8 +576,6 @@ void buffer_reg_channel_destroy(struct buffer_reg_channel *regp,
 
 /*
  * Destroy a buffer registry session with the given domain.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 static void buffer_reg_session_destroy(struct buffer_reg_session *regp,
                enum lttng_domain_type domain)
@@ -596,7 +596,7 @@ static void buffer_reg_session_destroy(struct buffer_reg_session *regp,
        }
        rcu_read_unlock();
 
-       ht_cleanup_push(regp->channels);
+       lttng_ht_destroy(regp->channels);
 
        switch (domain) {
        case LTTNG_DOMAIN_UST:
@@ -735,12 +735,10 @@ void buffer_reg_pid_destroy(struct buffer_reg_pid *regp)
 
 /*
  * Destroy per PID and UID registry hash table.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 void buffer_reg_destroy_registries(void)
 {
        DBG3("Buffer registry destroy all registry");
-       ht_cleanup_push(buffer_registry_uid);
-       ht_cleanup_push(buffer_registry_pid);
+       lttng_ht_destroy(buffer_registry_uid);
+       lttng_ht_destroy(buffer_registry_pid);
 }
This page took 0.024312 seconds and 4 git commands to generate.