summaryrefslogtreecommitdiffstats
path: root/runtime/base/mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/base/mutex.h')
-rw-r--r--runtime/base/mutex.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h
index feb8a6c..a875017 100644
--- a/runtime/base/mutex.h
+++ b/runtime/base/mutex.h
@@ -329,6 +329,11 @@ class ConditionVariable {
// TODO: remove this.
void WaitHoldingLocks(Thread* self) NO_THREAD_SAFETY_ANALYSIS;
+ // Return the number of people that are waiting on this condition.
+ int32_t GetNumWaiters() const NO_THREAD_SAFETY_ANALYSIS {
+ return num_waiters_;
+ }
+
private:
const char* const name_;
// The Mutex being used by waiters. It is an error to mix condition variables between different