mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 13:20:08 +02:00
36 lines
1.6 KiB
Plaintext
36 lines
1.6 KiB
Plaintext
From 2431494b0575741911f416e245cafc772e0cc171 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Fri, 20 May 2022 09:39:12 +0200
|
|
Subject: use __thread instead of thread_local
|
|
|
|
|
|
diff --git a/absl/strings/internal/cordz_functions.cc b/absl/strings/internal/cordz_functions.cc
|
|
index 20d314f..b1e6cc3 100644
|
|
--- a/absl/strings/internal/cordz_functions.cc
|
|
+++ b/absl/strings/internal/cordz_functions.cc
|
|
@@ -40,7 +40,7 @@ std::atomic<int> g_cordz_mean_interval(50000);
|
|
// Special negative 'not initialized' per thread value for cordz_next_sample.
|
|
static constexpr int64_t kInitCordzNextSample = -1;
|
|
|
|
-ABSL_CONST_INIT thread_local int64_t cordz_next_sample = kInitCordzNextSample;
|
|
+ABSL_CONST_INIT __thread int64_t cordz_next_sample = kInitCordzNextSample;
|
|
|
|
// kIntervalIfDisabled is the number of profile-eligible events need to occur
|
|
// before the code will confirm that cordz is still disabled.
|
|
diff --git a/absl/strings/internal/cordz_functions.h b/absl/strings/internal/cordz_functions.h
|
|
index c9ba145..17f6535 100644
|
|
--- a/absl/strings/internal/cordz_functions.h
|
|
+++ b/absl/strings/internal/cordz_functions.h
|
|
@@ -53,7 +53,7 @@ void set_cordz_mean_interval(int32_t mean_interval);
|
|
// the value is 1 or less, the code will check on the next event if cordz is
|
|
// enabled, and if so, will sample the Cord. cordz is only enabled when we can
|
|
// use thread locals.
|
|
-ABSL_CONST_INIT extern thread_local int64_t cordz_next_sample;
|
|
+ABSL_CONST_INIT extern __thread int64_t cordz_next_sample;
|
|
|
|
// Determines if the next sample should be profiled. If it is, the value pointed
|
|
// at by next_sample will be set with the interval until the next sample.
|
|
--
|
|
2.37.3
|
|
|