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

Unified Diff: third_party/mojo/src/mojo/edk/system/core.cc

Issue 1429553002: API definition for WaitSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update API. Created 5 years, 1 month 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: third_party/mojo/src/mojo/edk/system/core.cc
diff --git a/third_party/mojo/src/mojo/edk/system/core.cc b/third_party/mojo/src/mojo/edk/system/core.cc
index 64e2f82d95f71d950e8178822e66904acd03e88f..84b1d5cdacf7f39555c6962e7641e778dcbb8696 100644
--- a/third_party/mojo/src/mojo/edk/system/core.cc
+++ b/third_party/mojo/src/mojo/edk/system/core.cc
@@ -185,6 +185,54 @@ MojoResult Core::WaitMany(UserPointer<const MojoHandle> handles,
return rv;
}
+MojoResult Core::CreateWaitSet(UserPointer<MojoHandle> wait_set_handle) {
+ if (wait_set_handle.IsNull())
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ return MOJO_RESULT_UNIMPLEMENTED;
+}
+
+MojoResult Core::AddWaiter(MojoHandle wait_set_handle,
+ MojoHandle handle,
+ MojoHandleSignals signals) {
+ scoped_refptr<Dispatcher> wait_set_dispatcher(GetDispatcher(wait_set_handle));
+ if (!wait_set_dispatcher)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ scoped_refptr<Dispatcher> dispatcher(GetDispatcher(handle));
+ if (!dispatcher)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ return MOJO_RESULT_UNIMPLEMENTED;
+}
+
+MojoResult Core::RemoveWaiter(MojoHandle wait_set_handle,
+ MojoHandle handle) {
+ scoped_refptr<Dispatcher> wait_set_dispatcher(GetDispatcher(wait_set_handle));
+ if (!wait_set_dispatcher)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ scoped_refptr<Dispatcher> dispatcher(GetDispatcher(handle));
+ if (!dispatcher)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ return MOJO_RESULT_UNIMPLEMENTED;
+}
+
+MojoResult Core::GetReadyHandle(
+ MojoHandle wait_set_handle,
+ UserPointer<MojoHandle> handle,
+ UserPointer<MojoHandleSignalsState> signals_state) {
+ scoped_refptr<Dispatcher> wait_set_dispatcher(GetDispatcher(wait_set_handle));
+ if (!wait_set_dispatcher)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ if (handle.IsNull())
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ return MOJO_RESULT_UNIMPLEMENTED;
+}
+
MojoResult Core::CreateMessagePipe(
UserPointer<const MojoCreateMessagePipeOptions> options,
UserPointer<MojoHandle> message_pipe_handle0,

Powered by Google App Engine
This is Rietveld 408576698