summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-08-16 13:54:44 +0000
committerFangrui Song <maskray@google.com>2019-08-16 13:54:44 +0000
commit6897f99314452a04be2e08058ef2f7a93053539f (patch)
treea1251f8755bc1fa540ae8cb59029271ab2b61359
parent6e1ac424742bcaa8fcb259676e8ae6a183a38543 (diff)
downloadbcm5719-llvm-6897f99314452a04be2e08058ef2f7a93053539f.tar.gz
bcm5719-llvm-6897f99314452a04be2e08058ef2f7a93053539f.zip
[libcxxabi] __cxa_guard_require: test guard byte with != 0 instead of == 1
llvm-svn: 369109
-rw-r--r--libcxxabi/src/cxa_guard_impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/src/cxa_guard_impl.h b/libcxxabi/src/cxa_guard_impl.h
index 545731b0818..98e42ba2fb0 100644
--- a/libcxxabi/src/cxa_guard_impl.h
+++ b/libcxxabi/src/cxa_guard_impl.h
@@ -175,7 +175,7 @@ public:
/// Implements __cxa_guard_acquire
AcquireResult cxa_guard_acquire() {
AtomicInt<uint8_t> guard_byte(guard_byte_address);
- if (guard_byte.load(std::_AO_Acquire) == COMPLETE_BIT)
+ if (guard_byte.load(std::_AO_Acquire) != UNSET)
return INIT_IS_DONE;
return derived()->acquire_init_byte();
}
OpenPOWER on IntegriCloud