OSDN Git Service
(root)
/
android-x86
/
bionic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec43dd6
)
Fix pthread_barrier_smoke test.
author
Yabin Cui
<yabinc@google.com>
Tue, 2 May 2017 19:57:39 +0000
(12:57 -0700)
committer
Yabin Cui
<yabinc@google.com>
Wed, 3 May 2017 17:41:34 +0000
(10:41 -0700)
Bug: http://b/
37652807
Test: run bionic-unit-tests.
Change-Id: Id7245223bc2a284efed6e710892b58947ef5d555
(cherry picked from commit
d5c04c5ebb67e4581d7d861503de111ff84c5b75
)
tests/pthread_test.cpp
patch
|
blob
|
history
diff --git
a/tests/pthread_test.cpp
b/tests/pthread_test.cpp
index
60fe294
..
54f2b13
100755
(executable)
--- a/
tests/pthread_test.cpp
+++ b/
tests/pthread_test.cpp
@@
-1962,8
+1962,8
@@
static void BarrierTestHelper(BarrierTestHelperArg* arg) {
} else {
ASSERT_EQ(0, result);
}
-
arg->data->finished_mask |=
(1 << arg->id);
- if (
arg->data->finished_
mask == ((1 << arg->data->thread_count) - 1)) {
+
int mask = arg->data->finished_mask.fetch_or
(1 << arg->id);
+ if (mask == ((1 << arg->data->thread_count) - 1)) {
ASSERT_EQ(1, arg->data->serial_thread_count);
arg->data->finished_iteration_count++;
arg->data->finished_mask = 0;