Implement mutex requeueing for cv broadcasts.
Make the mutex guarding a condition variable part of its state. On a
broadcast requeue waiters on the mutex so they are awoken as the mutex
is unlocked (thereby avoiding thundering herds). Explicit futex use
still guarded behind ART_USE_FUTEXES which remains disabled as I'm
unhappy with some of the warts of mutex usage. Uploading so that the API
changes can stabilize.
Change-Id: Iedb601856ccd8bbc3a64da4ba0cee82246e7bcbf
diff --git a/src/debugger.cc b/src/debugger.cc
index 1e1e7b6..a34f690 100644
--- a/src/debugger.cc
+++ b/src/debugger.cc
@@ -2425,7 +2425,7 @@
// Wait for the request to finish executing.
while (req->invoke_needed_) {
- req->cond_.Wait(self, req->lock_);
+ req->cond_.Wait(self);
}
}
VLOG(jdwp) << " Control has returned from event thread";