am 56152a8b: am 34b258dd: [MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS.
* commit '56152a8b81bd5972391df562e4e3cd8a4cdda613': [MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS.
This commit is contained in:
commit
b8e30d7320
@ -66,7 +66,12 @@ TEST(stdatomic, atomic_is_lock_free) {
|
|||||||
atomic_char small;
|
atomic_char small;
|
||||||
atomic_intmax_t big;
|
atomic_intmax_t big;
|
||||||
ASSERT_TRUE(atomic_is_lock_free(&small));
|
ASSERT_TRUE(atomic_is_lock_free(&small));
|
||||||
|
// atomic_intmax_t(size = 64) is not lock free on mips32.
|
||||||
|
#if defined(__mips__) && !defined(__LP64__)
|
||||||
|
ASSERT_FALSE(atomic_is_lock_free(&big));
|
||||||
|
#else
|
||||||
ASSERT_TRUE(atomic_is_lock_free(&big));
|
ASSERT_TRUE(atomic_is_lock_free(&big));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(stdatomic, atomic_flag) {
|
TEST(stdatomic, atomic_flag) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user