Changes imported from Abseil "staging" branch:

- b7ac57541b07fadc3ed054cc3d62bc192a2098a7 Redefine arithmetic assign operators in terms of the bina... by Alex Strelnikov <strel@google.com>
  - bb2bf3fd86eb9f24420376aad1b9fe84068ad7e4 Cmake CI for Ubuntu by Jon Cohen <cohenjon@google.com>
  - 3ff3e6d6b4d99627f0785cad5b562362bdf1ae37 Fix internal namespace (debug_internal -> debugging_inter... by Derek Mauro <dmauro@google.com>
  - b50753d757c95a3430cc2d6cfc0272af1e5c219c Internal change. by Alex Strelnikov <strel@google.com>

GitOrigin-RevId: b7ac57541b07fadc3ed054cc3d62bc192a2098a7
Change-Id: I7561639e296d1cc5dc7ee75e6645e8dae3f1bf97
This commit is contained in:
Abseil Team 2018-02-06 06:42:19 -08:00 committed by katzdm
parent bf7fc9986e
commit 3917120a4c
12 changed files with 116 additions and 86 deletions

View file

@ -38,18 +38,18 @@
#endif
namespace absl {
namespace debug_internal {
namespace debugging_internal {
ABSL_CONST_INIT
std::atomic<const void *> VDSOSupport::vdso_base_(
debug_internal::ElfMemImage::kInvalidBase);
debugging_internal::ElfMemImage::kInvalidBase);
std::atomic<VDSOSupport::GetCpuFn> VDSOSupport::getcpu_fn_(&InitAndGetCPU);
VDSOSupport::VDSOSupport()
// If vdso_base_ is still set to kInvalidBase, we got here
// before VDSOSupport::Init has been called. Call it now.
: image_(vdso_base_.load(std::memory_order_relaxed) ==
debug_internal::ElfMemImage::kInvalidBase
debugging_internal::ElfMemImage::kInvalidBase
? Init()
: vdso_base_.load(std::memory_order_relaxed)) {}
@ -63,7 +63,7 @@ VDSOSupport::VDSOSupport()
// Finally, even if there is a race here, it is harmless, because
// the operation should be idempotent.
const void *VDSOSupport::Init() {
const auto kInvalidBase = debug_internal::ElfMemImage::kInvalidBase;
const auto kInvalidBase = debugging_internal::ElfMemImage::kInvalidBase;
#if __GLIBC_PREREQ(2, 16)
if (vdso_base_.load(std::memory_order_relaxed) == kInvalidBase) {
errno = 0;
@ -120,7 +120,7 @@ const void *VDSOSupport::Init() {
}
const void *VDSOSupport::SetBase(const void *base) {
ABSL_RAW_CHECK(base != debug_internal::ElfMemImage::kInvalidBase,
ABSL_RAW_CHECK(base != debugging_internal::ElfMemImage::kInvalidBase,
"internal error");
const void *old_base = vdso_base_.load(std::memory_order_relaxed);
vdso_base_.store(base, std::memory_order_relaxed);
@ -186,7 +186,7 @@ static class VDSOInitHelper {
VDSOInitHelper() { VDSOSupport::Init(); }
} vdso_init_helper;
} // namespace debug_internal
} // namespace debugging_internal
} // namespace absl
#endif // ABSL_HAVE_VDSO_SUPPORT