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

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

Issue 2060943007: Make it possible to remove an Awakable with a specific "context" from a Dispatcher. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 5e6166a979bafec1e63b1aa5589dab557d3df768..74b73a7949350f6329d824b17285fec3bbbc2b29 100644
--- a/mojo/edk/system/message_pipe.cc
+++ b/mojo/edk/system/message_pipe.cc
@@ -215,6 +215,18 @@ void MessagePipe::RemoveAwakable(unsigned 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);
+}
+
void MessagePipe::StartSerialize(unsigned /*port*/,
Channel* channel,
size_t* max_size,
« 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