]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/monitoring/thread_status_updater.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / monitoring / thread_status_updater.cc
index 7e4b299a8c0b466f3825561c77993de52fa839f8..9707d22656c620feaeff058dc3f9291dcea09ddf 100644 (file)
@@ -4,16 +4,20 @@
 //  (found in the LICENSE.Apache file in the root directory).
 
 #include "monitoring/thread_status_updater.h"
+
 #include <memory>
+
 #include "port/likely.h"
 #include "rocksdb/env.h"
+#include "rocksdb/system_clock.h"
 #include "util/mutexlock.h"
 
 namespace ROCKSDB_NAMESPACE {
 
 #ifdef ROCKSDB_USING_THREAD_STATUS
 
-__thread ThreadStatusData* ThreadStatusUpdater::thread_status_data_ = nullptr;
+thread_local ThreadStatusData* ThreadStatusUpdater::thread_status_data_ =
+    nullptr;
 
 void ThreadStatusUpdater::RegisterThread(ThreadStatus::ThreadType ttype,
                                          uint64_t thread_id) {
@@ -159,7 +163,7 @@ Status ThreadStatusUpdater::GetThreadList(
     std::vector<ThreadStatus>* thread_list) {
   thread_list->clear();
   std::vector<std::shared_ptr<ThreadStatusData>> valid_list;
-  uint64_t now_micros = Env::Default()->NowMicros();
+  uint64_t now_micros = SystemClock::Default()->NowMicros();
 
   std::lock_guard<std::mutex> lck(thread_list_mutex_);
   for (auto* thread_data : thread_data_set_) {