summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-07-05 17:29:55 +0100
committer Vladimir Marko <vmarko@google.com> 2016-07-05 17:55:07 +0100
commitd778cd68c5d093c2fb95f91608deb36fea8e8bad (patch)
tree1e064bbc8743fadda81f6bae332aac6104c36846
parent74c0d1bb67f9c6ee8306f0318ab7251d56dc99d6 (diff)
Expect spurious wake-up from futex(2)/FUTEX_WAIT call.
Test: Run standard ART test suite. Bug: 27913630 Change-Id: I742544f7a0a7f896e47293d209a874782577e971
-rw-r--r--runtime/thread_list.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index 97bcb7d406..16ef0fff22 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -613,11 +613,7 @@ void ThreadList::SuspendAllInternal(Thread* self,
PLOG(FATAL) << "futex wait failed for SuspendAllInternal()";
}
}
- } else {
- cur_val = pending_threads.LoadRelaxed();
- CHECK_EQ(cur_val, 0);
- break;
- }
+ } // else re-check pending_threads in the next iteration (this may be a spurious wake-up).
#else
// Spin wait. This is likely to be slow, but on most architecture ART_USE_FUTEXES is set.
#endif