summaryrefslogtreecommitdiff
path: root/absl/base
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2020-07-01 12:27:47 -0700
committerGravatar Derek Mauro <dmauro@google.com>2020-07-01 16:40:29 -0400
commit38db52adb2eabc0969195b33b30763e0a1285ef9 (patch)
treed5c43dc994e4c11b18fda7b1506ea9002daf4835 /absl/base
parent81f34df8347a73c617f244f49cb916238857dc34 (diff)
Export of internal Abseil changes
-- 510cd0bc2ff9cf21e1e960264d179fa333a88612 by Derek Mauro <dmauro@google.com>: Removes the static initializer for VDSOSupport as requested by Chromium. The call is moved to InitializeSymbolizer(). PiperOrigin-RevId: 319275021 -- 0c91944889ad2bd10bc8080f4cd8083ca1d5de46 by Derek Mauro <dmauro@google.com>: Check for the lock_returned attribute before using it PiperOrigin-RevId: 319273193 -- 1001fa71bfb850f00502777f787aeff6e80654ca by Derek Mauro <dmauro@google.com>: Remove a no longer relevant MSVC code guard PiperOrigin-RevId: 319266085 -- a80caee79eb3f377c6bf97bec6b692c55169fe53 by Abseil Team <absl-team@google.com>: Bug fix to StrFormat %a rounding behavior for `long double`. PiperOrigin-RevId: 319238900 -- fdec318c449f1ca586145397099b03d973b738c4 by Abseil Team <absl-team@google.com>: Add test cases for absl::Time +/- absl::InfiniteDuration() == absl::Infinite{Future|Past}. PiperOrigin-RevId: 319223053 GitOrigin-RevId: 510cd0bc2ff9cf21e1e960264d179fa333a88612 Change-Id: I4b8932fb0ec6ab9c868450faf4ed837092a7c0c0
Diffstat (limited to 'absl/base')
-rw-r--r--absl/base/thread_annotations.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/absl/base/thread_annotations.h b/absl/base/thread_annotations.h
index 5f51c0c2..6a7112df 100644
--- a/absl/base/thread_annotations.h
+++ b/absl/base/thread_annotations.h
@@ -34,6 +34,7 @@
#ifndef ABSL_BASE_THREAD_ANNOTATIONS_H_
#define ABSL_BASE_THREAD_ANNOTATIONS_H_
+#include "absl/base/attributes.h"
#include "absl/base/config.h"
// TODO(mbonadei): Remove after the backward compatibility period.
#include "absl/base/internal/thread_annotations.h" // IWYU pragma: export
@@ -151,8 +152,12 @@
// Documents a function that returns a mutex without acquiring it. For example,
// a public getter method that returns a pointer to a private mutex should
// be annotated with ABSL_LOCK_RETURNED.
+#if ABSL_HAVE_ATTRIBUTE(lock_returned)
#define ABSL_LOCK_RETURNED(x) \
ABSL_INTERNAL_THREAD_ANNOTATION_ATTRIBUTE(lock_returned(x))
+#else
+#define ABSL_LOCK_RETURNED(x)
+#endif
// ABSL_LOCKABLE
//