Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(926)

Unified Diff: mojo/edk/system/dispatcher.cc

Issue 782693004: Update mojo sdk to rev f6c8ec07c01deebc13178d516225fd12695c3dc2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hack mojo_system_impl gypi for android :| Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/edk/system/dispatcher.cc
diff --git a/mojo/edk/system/dispatcher.cc b/mojo/edk/system/dispatcher.cc
index bed5f9eaeb0a86db774326ff858b3a8cfd2b823a..e2f2b8784f4684c9d1c074e1a7aae65e8c6ccd66 100644
--- a/mojo/edk/system/dispatcher.cc
+++ b/mojo/edk/system/dispatcher.cc
@@ -220,10 +220,10 @@ HandleSignalsState Dispatcher::GetHandleSignalsState() const {
return GetHandleSignalsStateImplNoLock();
}
-MojoResult Dispatcher::AddWaiter(Waiter* waiter,
- MojoHandleSignals signals,
- uint32_t context,
- HandleSignalsState* signals_state) {
+MojoResult Dispatcher::AddAwakable(Awakable* awakable,
+ MojoHandleSignals signals,
+ uint32_t context,
+ HandleSignalsState* signals_state) {
base::AutoLock locker(lock_);
if (is_closed_) {
if (signals_state)
@@ -231,18 +231,19 @@ MojoResult Dispatcher::AddWaiter(Waiter* waiter,
return MOJO_RESULT_INVALID_ARGUMENT;
}
- return AddWaiterImplNoLock(waiter, signals, context, signals_state);
+ return AddAwakableImplNoLock(awakable, signals, context, signals_state);
}
-void Dispatcher::RemoveWaiter(Waiter* waiter,
- HandleSignalsState* handle_signals_state) {
+void Dispatcher::RemoveAwakable(Awakable* awakable,
+ HandleSignalsState* handle_signals_state) {
base::AutoLock locker(lock_);
if (is_closed_) {
if (handle_signals_state)
*handle_signals_state = HandleSignalsState();
return;
}
- RemoveWaiterImplNoLock(waiter, handle_signals_state);
+
+ RemoveAwakableImplNoLock(awakable, handle_signals_state);
}
Dispatcher::Dispatcher() : is_closed_(false) {
@@ -253,7 +254,7 @@ Dispatcher::~Dispatcher() {
DCHECK(is_closed_);
}
-void Dispatcher::CancelAllWaitersNoLock() {
+void Dispatcher::CancelAllAwakablesNoLock() {
lock_.AssertAcquired();
DCHECK(is_closed_);
// By default, waiting isn't supported. Only dispatchers that can be waited on
@@ -370,10 +371,11 @@ HandleSignalsState Dispatcher::GetHandleSignalsStateImplNoLock() const {
return HandleSignalsState();
}
-MojoResult Dispatcher::AddWaiterImplNoLock(Waiter* /*waiter*/,
- MojoHandleSignals /*signals*/,
- uint32_t /*context*/,
- HandleSignalsState* signals_state) {
+MojoResult Dispatcher::AddAwakableImplNoLock(
+ Awakable* /*awakable*/,
+ MojoHandleSignals /*signals*/,
+ uint32_t /*context*/,
+ HandleSignalsState* signals_state) {
lock_.AssertAcquired();
DCHECK(!is_closed_);
// By default, waiting isn't supported. Only dispatchers that can be waited on
@@ -383,8 +385,8 @@ MojoResult Dispatcher::AddWaiterImplNoLock(Waiter* /*waiter*/,
return MOJO_RESULT_FAILED_PRECONDITION;
}
-void Dispatcher::RemoveWaiterImplNoLock(Waiter* /*waiter*/,
- HandleSignalsState* signals_state) {
+void Dispatcher::RemoveAwakableImplNoLock(Awakable* /*awakable*/,
+ HandleSignalsState* signals_state) {
lock_.AssertAcquired();
DCHECK(!is_closed_);
// By default, waiting isn't supported. Only dispatchers that can be waited on
@@ -427,7 +429,7 @@ void Dispatcher::CloseNoLock() {
DCHECK(!is_closed_);
is_closed_ = true;
- CancelAllWaitersNoLock();
+ CancelAllAwakablesNoLock();
CloseImplNoLock();
}
@@ -437,7 +439,7 @@ Dispatcher::CreateEquivalentDispatcherAndCloseNoLock() {
DCHECK(!is_closed_);
is_closed_ = true;
- CancelAllWaitersNoLock();
+ CancelAllAwakablesNoLock();
return CreateEquivalentDispatcherAndCloseImplNoLock();
}

Powered by Google App Engine
This is Rietveld 408576698