diff options
Diffstat (limited to 'runtime/barrier_test.cc')
| -rw-r--r-- | runtime/barrier_test.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/barrier_test.cc b/runtime/barrier_test.cc index 331d0c0175..086ef440a3 100644 --- a/runtime/barrier_test.cc +++ b/runtime/barrier_test.cc @@ -77,20 +77,20 @@ TEST_F(BarrierTest, CheckWait) { barrier.Increment(self, num_threads); // At this point each thread should have passed through the barrier. The first count should be // equal to num_threads. - EXPECT_EQ(num_threads, count1); + EXPECT_EQ(num_threads, count1.LoadRelaxed()); // Count 3 should still be zero since no thread should have gone past the second barrier. - EXPECT_EQ(0, count3); + EXPECT_EQ(0, count3.LoadRelaxed()); // Now lets tell the threads to pass again. barrier.Increment(self, num_threads); // Count 2 should be equal to num_threads since each thread must have passed the second barrier // at this point. - EXPECT_EQ(num_threads, count2); + EXPECT_EQ(num_threads, count2.LoadRelaxed()); // Wait for all the threads to finish. thread_pool.Wait(self, true, false); // All three counts should be equal to num_threads now. - EXPECT_EQ(count1, count2); - EXPECT_EQ(count2, count3); - EXPECT_EQ(num_threads, count3); + EXPECT_EQ(count1.LoadRelaxed(), count2.LoadRelaxed()); + EXPECT_EQ(count2.LoadRelaxed(), count3.LoadRelaxed()); + EXPECT_EQ(num_threads, count3.LoadRelaxed()); } class CheckPassTask : public Task { @@ -133,7 +133,7 @@ TEST_F(BarrierTest, CheckPass) { // Wait for all the tasks to complete using the barrier. barrier.Increment(self, expected_total_tasks); // The total number of completed tasks should be equal to expected_total_tasks. - EXPECT_EQ(count, expected_total_tasks); + EXPECT_EQ(count.LoadRelaxed(), expected_total_tasks); } } // namespace art |