]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/util/thread_local.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / util / thread_local.h
index c4b762ab6ff490128fef83a84ff744f504af4bbf..fde68f86fb18a47b72c0743744a2239699971c90 100644 (file)
@@ -15,8 +15,8 @@
 #include <unordered_map>
 #include <vector>
 
-#include "util/autovector.h"
 #include "port/port.h"
+#include "util/autovector.h"
 
 namespace ROCKSDB_NAMESPACE {
 
@@ -31,7 +31,7 @@ namespace ROCKSDB_NAMESPACE {
 // is needed to avoid deadlocks. In particular, the handler shouldn't lock any
 // mutexes and shouldn't call any methods of any ThreadLocalPtr instances,
 // unless you know what you're doing.
-typedef void (*UnrefHandler)(void* ptr);
+using UnrefHandler = void (*)(void* ptr);
 
 // ThreadLocalPtr stores only values of pointer type.  Different from
 // the usual thread-local-storage, ThreadLocalPtr has the ability to
@@ -69,7 +69,7 @@ class ThreadLocalPtr {
   // data for all existing threads
   void Scrape(autovector<void*>* ptrs, void* const replacement);
 
-  typedef std::function<void(void*, void*)> FoldFunc;
+  using FoldFunc = std::function<void(void*, void*)>;
   // Update res by applying func on each thread-local value. Holds a lock that
   // prevents unref handler from running during this call, but clients must
   // still provide external synchronization since the owning thread can
@@ -91,8 +91,7 @@ class ThreadLocalPtr {
 
   class StaticMeta;
 
-private:
-
+ private:
   static StaticMeta* Instance();
 
   const uint32_t id_;