summaryrefslogtreecommitdiff
path: root/tests/stdatomic_test.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2019-08-05 08:20:14 -0700
committerYi Kong <yikong@google.com>2019-08-14 07:08:28 +0000
commit32b5f4e16b8aec587dc84dcf26c82125839b9a31 (patch)
tree42316f39db27d3e8c346369c2658909d738c74f3 /tests/stdatomic_test.cpp
parentbf67ea54267fc07d3dd528ead69767b27af61e80 (diff)
stdatomic_test: always use bits/stdatomic.h
Host includes are updated now, so we always must include bits/stdatomic.h Bug: 137876753 Bug: 138701943 Test: not yet Change-Id: Ib2ce34ae5dace8f9a114fa8c04f864cd7f41a5d9
Diffstat (limited to 'tests/stdatomic_test.cpp')
-rw-r--r--tests/stdatomic_test.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/stdatomic_test.cpp b/tests/stdatomic_test.cpp
index a9665d18e..9911d642e 100644
--- a/tests/stdatomic_test.cpp
+++ b/tests/stdatomic_test.cpp
@@ -16,12 +16,9 @@
#include <gtest/gtest.h>
-#if defined(__ANDROID__)
+// The real <stdatomic.h> checks for the availability of C++'s atomics and uses them if present. Since
+// we want to test the libc versions, we instead include <bits/stdatomic.h> where they're actually defined.
#include <bits/stdatomic.h>
-#else
-#undef _USING_LIBCXX //TODO(b/137876753): Remove this
-#include <stdatomic.h>
-#endif
#include <pthread.h>
#include <stdint.h>