summaryrefslogtreecommitdiff
path: root/absl/time/clock.cc
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2020-09-25 17:10:06 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2020-09-25 17:10:06 -0400
commit4e1c98fe594d99494ce26e94a77f0358705f227c (patch)
treea07e9daefa3b5acf716ce89fa1a1c9b500fde795 /absl/time/clock.cc
parent7a1e14d0d29736ba9c2884d0ce81fc0af92f6ab3 (diff)
parentb56cbdd23834a65682c0b46f367f8679e83bc894 (diff)
Merge new upstream LTS 20200923
Diffstat (limited to 'absl/time/clock.cc')
-rw-r--r--absl/time/clock.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/absl/time/clock.cc b/absl/time/clock.cc
index 3b895c38..e5c423c7 100644
--- a/absl/time/clock.cc
+++ b/absl/time/clock.cc
@@ -226,9 +226,9 @@ static_assert(((kMinNSBetweenSamples << (kScale + 1)) >> (kScale + 1)) ==
// A reader-writer lock protecting the static locations below.
// See SeqAcquire() and SeqRelease() above.
-static absl::base_internal::SpinLock lock(
- absl::base_internal::kLinkerInitialized);
-static std::atomic<uint64_t> seq(0);
+ABSL_CONST_INIT static absl::base_internal::SpinLock lock(
+ absl::kConstInit, base_internal::SCHEDULE_KERNEL_ONLY);
+ABSL_CONST_INIT static std::atomic<uint64_t> seq(0);
// data from a sample of the kernel's time value
struct TimeSampleAtomic {