]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/monitoring/thread_status_util.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / monitoring / thread_status_util.h
index b4d97b0b637ccfa84b0385f920aba890097577ce..0137d26823f0d431bdd7867baa350b4bb9684c1c 100644 (file)
@@ -30,8 +30,8 @@ class ColumnFamilyData;
 class ThreadStatusUtil {
  public:
   // Register the current thread for tracking.
-  static void RegisterThread(
-      const Env* env, ThreadStatus::ThreadType thread_type);
+  static void RegisterThread(const Env* env,
+                             ThreadStatus::ThreadType thread_type);
 
   // Unregister the current thread.
   static void UnregisterThread();
@@ -62,19 +62,17 @@ class ThreadStatusUtil {
   static ThreadStatus::OperationStage SetThreadOperationStage(
       ThreadStatus::OperationStage stage);
 
-  static void SetThreadOperationProperty(
-      int code, uint64_t value);
+  static void SetThreadOperationProperty(int code, uint64_t value);
 
-  static void IncreaseThreadOperationProperty(
-      int code, uint64_t delta);
+  static void IncreaseThreadOperationProperty(int code, uint64_t delta);
 
   static void SetThreadState(ThreadStatus::StateType type);
 
   static void ResetThreadStatus();
 
 #ifndef NDEBUG
-  static void TEST_SetStateDelay(
-      const ThreadStatus::StateType state, int micro);
+  static void TEST_SetStateDelay(const ThreadStatus::StateType state,
+                                 int micro);
   static void TEST_StateDelay(const ThreadStatus::StateType state);
 #endif
 
@@ -94,7 +92,7 @@ class ThreadStatusUtil {
   // When this variable is set to true, thread_updater_local_cache_
   // will not be updated until this variable is again set to false
   // in UnregisterThread().
-  static  __thread bool thread_updater_initialized_;
+  static thread_local bool thread_updater_initialized_;
 
   // The thread-local cached ThreadStatusUpdater that caches the
   // thread_status_updater_ of the first Env that uses any ThreadStatusUtil
@@ -109,7 +107,7 @@ class ThreadStatusUtil {
   // When thread_updater_initialized_ is set to true, this variable
   // will not be updated until this thread_updater_initialized_ is
   // again set to false in UnregisterThread().
-  static __thread ThreadStatusUpdater* thread_updater_local_cache_;
+  static thread_local ThreadStatusUpdater* thread_updater_local_cache_;
 #else
   static bool thread_updater_initialized_;
   static ThreadStatusUpdater* thread_updater_local_cache_;
@@ -121,8 +119,7 @@ class ThreadStatusUtil {
 // and set the thread state to the previous state in its destructor.
 class AutoThreadOperationStageUpdater {
  public:
-  explicit AutoThreadOperationStageUpdater(
-      ThreadStatus::OperationStage stage);
+  explicit AutoThreadOperationStageUpdater(ThreadStatus::OperationStage stage);
   ~AutoThreadOperationStageUpdater();
 
 #ifdef ROCKSDB_USING_THREAD_STATUS