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

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

Issue 2084593005: Rationalize AddAwakable...() and RemoveAwakable...() methods. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 6 months 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
« no previous file with comments | « mojo/edk/system/message_pipe.h ('k') | mojo/edk/system/message_pipe_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe.cc
diff --git a/mojo/edk/system/message_pipe.cc b/mojo/edk/system/message_pipe.cc
index 74b73a7949350f6329d824b17285fec3bbbc2b29..9de43d63e4c42678659f1621254f5ebdf2324fbc 100644
--- a/mojo/edk/system/message_pipe.cc
+++ b/mojo/edk/system/message_pipe.cc
@@ -191,40 +191,31 @@ HandleSignalsState MessagePipe::GetHandleSignalsState(unsigned port) const {
MojoResult MessagePipe::AddAwakable(unsigned port,
Awakable* awakable,
- MojoHandleSignals signals,
- bool force,
uint64_t context,
+ bool force,
+ MojoHandleSignals signals,
HandleSignalsState* signals_state) {
DCHECK(port == 0 || port == 1);
MutexLocker locker(&mutex_);
DCHECK(endpoints_[port]);
- return endpoints_[port]->AddAwakable(awakable, signals, force, context,
+ return endpoints_[port]->AddAwakable(awakable, context, force, signals,
signals_state);
}
void MessagePipe::RemoveAwakable(unsigned port,
+ bool match_context,
Awakable* awakable,
+ uint64_t context,
HandleSignalsState* signals_state) {
DCHECK(port == 0 || port == 1);
MutexLocker locker(&mutex_);
DCHECK(endpoints_[port]);
- endpoints_[port]->RemoveAwakable(awakable, signals_state);
-}
-
-void MessagePipe::RemoveAwakableWithContext(unsigned port,
- Awakable* awakable,
- uint64_t context,
- HandleSignalsState* signals_state) {
- DCHECK(port == 0 || port == 1);
-
- MutexLocker locker(&mutex_);
- DCHECK(endpoints_[port]);
-
- endpoints_[port]->RemoveAwakableWithContext(awakable, context, signals_state);
+ endpoints_[port]->RemoveAwakable(match_context, awakable, context,
+ signals_state);
}
void MessagePipe::StartSerialize(unsigned /*port*/,
« no previous file with comments | « mojo/edk/system/message_pipe.h ('k') | mojo/edk/system/message_pipe_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698