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

Unified Diff: mojo/edk/embedder/entrypoints.cc

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: . Created 3 years, 9 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/common/data_pipe_drainer.cc ('k') | mojo/edk/js/drain_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/entrypoints.cc
diff --git a/mojo/edk/embedder/entrypoints.cc b/mojo/edk/embedder/entrypoints.cc
index f09c5e149f65062545f118f85af1e625c53c3f61..ecf163061f5970d5d74965d1b162debef1499ada 100644
--- a/mojo/edk/embedder/entrypoints.cc
+++ b/mojo/edk/embedder/entrypoints.cc
@@ -45,15 +45,29 @@ MojoResult MojoWaitManyImpl(const MojoHandle* handles,
signals_states);
}
-MojoResult MojoWatchImpl(MojoHandle handle,
+MojoResult MojoCreateWatcherImpl(MojoWatcherCallback callback,
+ MojoHandle* watcher_handle) {
+ return g_core->CreateWatcher(callback, watcher_handle);
+}
+
+MojoResult MojoArmWatcherImpl(MojoHandle watcher_handle,
+ uint32_t* num_ready_contexts,
+ uintptr_t* ready_contexts,
+ MojoResult* ready_results,
+ MojoHandleSignalsState* ready_signals_states) {
+ return g_core->ArmWatcher(watcher_handle, num_ready_contexts, ready_contexts,
+ ready_results, ready_signals_states);
+}
+
+MojoResult MojoWatchImpl(MojoHandle watcher_handle,
+ MojoHandle handle,
MojoHandleSignals signals,
- MojoWatchCallback callback,
uintptr_t context) {
- return g_core->Watch(handle, signals, callback, context);
+ return g_core->Watch(watcher_handle, handle, signals, context);
}
-MojoResult MojoCancelWatchImpl(MojoHandle handle, uintptr_t context) {
- return g_core->CancelWatch(handle, context);
+MojoResult MojoCancelWatchImpl(MojoHandle watcher_handle, uintptr_t context) {
+ return g_core->CancelWatch(watcher_handle, context);
}
MojoResult MojoAllocMessageImpl(uint32_t num_bytes,
@@ -287,8 +301,10 @@ MojoSystemThunks MakeSystemThunks() {
MojoAddHandleImpl,
MojoRemoveHandleImpl,
MojoGetReadyHandlesImpl,
+ MojoCreateWatcherImpl,
MojoWatchImpl,
MojoCancelWatchImpl,
+ MojoArmWatcherImpl,
MojoFuseMessagePipesImpl,
MojoWriteMessageNewImpl,
MojoReadMessageNewImpl,
« no previous file with comments | « mojo/common/data_pipe_drainer.cc ('k') | mojo/edk/js/drain_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698