sessiond: registry_session: mark functions as noexcept
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 9 Jun 2022 16:16:39 +0000 (12:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 13 Jun 2022 20:34:47 +0000 (16:34 -0400)
Mark functions destroy_channel and _destroy_enum as noexcept as they are
used by the registry_session destructor (which must not throw).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ie7bbbf349f14f5691b52873fe8ba6556be143d93

src/bin/lttng-sessiond/ust-registry-session.cpp
src/bin/lttng-sessiond/ust-registry-session.hpp

index 255a5ec8176ce96dc17c4e6e5a446549735aea8d..b78091a04f4ca277ac033b2c60b85670922abf4d 100644 (file)
@@ -98,8 +98,10 @@ void destroy_channel_rcu(struct rcu_head *head)
  * Destroy every element of the registry and free the memory. This does NOT
  * free the registry pointer since it might not have been allocated before so
  * it's the caller responsability.
+ *
+ * Called from ~registry_session(), must not throw.
  */
-void destroy_channel(lsu::registry_channel *chan, bool notify)
+void destroy_channel(lsu::registry_channel *chan, bool notify) noexcept
 {
        struct lttng_ht_iter iter;
        lttng::sessiond::ust::registry_event *event;
@@ -286,8 +288,10 @@ lsu::registry_session::registry_session(const struct lst::abi& in_abi,
 /*
  * For a given enumeration in a registry, delete the entry and destroy
  * the enumeration.
+ *
+ * Note that this is used by ~registry_session() and must not throw.
  */
-void lsu::registry_session::_destroy_enum(lsu::registry_enum *reg_enum)
+void lsu::registry_session::_destroy_enum(lsu::registry_enum *reg_enum) noexcept
 {
        int ret;
        lttng::urcu::read_lock_guard read_lock_guard;
index 0bd023d70dd5b25856468f3c2350fe635d2adc02..cce7c5c1b7baef7958f80f10c0e9eef9ceca883c 100644 (file)
@@ -112,7 +112,7 @@ private:
        void _increase_metadata_size(size_t reservation_length);
        void _append_metadata_fragment(const std::string& fragment);
        void _reset_metadata();
-       void _destroy_enum(registry_enum *reg_enum);
+       void _destroy_enum(registry_enum *reg_enum) noexcept;
        registry_enum *_lookup_enum(const registry_enum *target_enum) const;
 
        virtual void _accept_on_clock_classes(
This page took 0.025773 seconds and 4 git commands to generate.