From: Max Kellermann Date: Wed, 9 Oct 2024 12:17:54 +0000 (+0200) Subject: common/Finisher: add `const` to several fields X-Git-Tag: v20.0.0~789^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a1e7ef6383ee993143544c661a9f274dfd4261f8;p=ceph.git common/Finisher: add `const` to several fields These are never changed; `const` prevents accidental changes and allows further compiler optimizations. Signed-off-by: Max Kellermann --- diff --git a/src/common/Finisher.h b/src/common/Finisher.h index 4cc5643efad..28c519b409c 100644 --- a/src/common/Finisher.h +++ b/src/common/Finisher.h @@ -36,7 +36,7 @@ enum { * contexts to complete is thread-safe. */ class Finisher { - CephContext *cct; + CephContext *const cct; ceph::mutex finisher_lock; ///< Protects access to queues and finisher_running. ceph::condition_variable finisher_cond; ///< Signaled when there is something to process. ceph::condition_variable finisher_empty_cond; ///< Signaled when the finisher has nothing more to process. @@ -48,7 +48,7 @@ class Finisher { std::vector> finisher_queue; std::vector> in_progress_queue; - std::string thread_name; + const std::string thread_name; /// Performance counter for the finisher's queue length. /// Only active for named finishers.