]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/common: Add a destructor to shared_mutex_debug 66497/head
authorHui Tong <th937013596@gmail.com>
Wed, 3 Dec 2025 13:55:36 +0000 (21:55 +0800)
committerHui Tong <937013596@qq.com>
Thu, 11 Dec 2025 10:59:32 +0000 (18:59 +0800)
Signed-off-by: Hui Tong <th937013596@gmail.com>
src/common/shared_mutex_debug.cc
src/common/shared_mutex_debug.h

index 258cf4039bbcac3523a584ca8a75ab147bfa289f..5e9e861d51f97cfe0f22d7749c1d1f0a9c0fbc3a 100644 (file)
@@ -38,6 +38,11 @@ shared_mutex_debug::shared_mutex_debug(std::string group,
   ANNOTATE_BENIGN_RACE_SIZED(&nrlock, sizeof(nrlock), "shared_mutex_debug nrlock");
 }
 
+shared_mutex_debug::~shared_mutex_debug()
+{
+  pthread_rwlock_destroy(&rwlock);
+}
+
 // exclusive
 void shared_mutex_debug::lock()
 {
index 1c1645b20cff86d9fce14ec037313c56f796d713..574e8e258e92160a21e55cd0145b55c17bdc2eb5 100644 (file)
@@ -22,6 +22,7 @@ public:
                     bool track_lock=true,
                     bool enable_lock_dep=true,
                     bool prioritize_write=false);
+  ~shared_mutex_debug();
   // exclusive locking
   void lock();
   bool try_lock();