summaryrefslogtreecommitdiff
path: root/absl/base/internal
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2020-10-13 08:26:15 -0700
committerGravatar Derek Mauro <dmauro@google.com>2020-10-13 12:49:13 -0400
commitf3f785ab59478dd0312bf1b5df65d380650bf0dc (patch)
treec6cb0ba6e13b43ccfc1c60bf4dfed9ea0d38e62f /absl/base/internal
parent4b2fbb4adba905eede6c61b4494acfdb660a3bb7 (diff)
Export of internal Abseil changes
-- 5bd06440e700fefd6eadd577d7d69c51f15c63e0 by Abseil Team <absl-team@google.com>: Add if-guard to futex.h so that it doesn't fail to parse for unsupported platforms PiperOrigin-RevId: 336880375 -- 8b3d3bb4ad123fc9f648f0e397b2eddd88dc0c02 by Derek Mauro <dmauro@google.com>: Fix race in AddressIsReadable file descriptors using stronger memory ordering PiperOrigin-RevId: 336874423 -- 1d8bf23747009cca29129b80c2793bc91443dd55 by Derek Mauro <dmauro@google.com>: Avoid -Wundef warnings on ABSL_HAVE_THREAD_LOCAL PiperOrigin-RevId: 336792406 -- 562a480f029c600c1d3b1428da6a9b09e8952a74 by Derek Mauro <dmauro@google.com>: Fix preprocessor condition for symbols __tsan_mutex_read_lock and __tsan_mutex_try_lock PiperOrigin-RevId: 336732571 GitOrigin-RevId: 5bd06440e700fefd6eadd577d7d69c51f15c63e0 Change-Id: Id9bb331baec74b9d80c7b228959a7739bc30e694
Diffstat (limited to 'absl/base/internal')
-rw-r--r--absl/base/internal/exponential_biased_test.cc2
-rw-r--r--absl/base/internal/sysinfo.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/absl/base/internal/exponential_biased_test.cc b/absl/base/internal/exponential_biased_test.cc
index 90a482d2..075583ca 100644
--- a/absl/base/internal/exponential_biased_test.cc
+++ b/absl/base/internal/exponential_biased_test.cc
@@ -185,7 +185,7 @@ TEST(ExponentialBiasedTest, InitializationModes) {
ABSL_CONST_INIT static ExponentialBiased eb_static;
EXPECT_THAT(eb_static.GetSkipCount(2), Ge(0));
-#if ABSL_HAVE_THREAD_LOCAL
+#ifdef ABSL_HAVE_THREAD_LOCAL
thread_local ExponentialBiased eb_thread;
EXPECT_THAT(eb_thread.GetSkipCount(2), Ge(0));
#endif
diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc
index 349d9268..4a3b2050 100644
--- a/absl/base/internal/sysinfo.cc
+++ b/absl/base/internal/sysinfo.cc
@@ -426,7 +426,7 @@ pid_t GetTID() {
// userspace construct) to avoid unnecessary system calls. Without this caching,
// it can take roughly 98ns, while it takes roughly 1ns with this caching.
pid_t GetCachedTID() {
-#if ABSL_HAVE_THREAD_LOCAL
+#ifdef ABSL_HAVE_THREAD_LOCAL
static thread_local pid_t thread_id = GetTID();
return thread_id;
#else