Enforce documented RCU preconditions with assertions
[lttng-tools.git] / src / bin / lttng-sessiond / buffer-registry.cpp
index 3928818272e1f334871b749f4684a38a813b2389..64e98333ffb6549cb2ffc5ca849a4d598b8780f4 100644 (file)
@@ -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;
@@ -594,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:
@@ -737,6 +739,6 @@ void buffer_reg_pid_destroy(struct buffer_reg_pid *regp)
 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.046612 seconds and 4 git commands to generate.