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

Unified Diff: mojo/public/c/system/thunks.cc

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: rebase 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
Index: mojo/public/c/system/thunks.cc
diff --git a/mojo/public/c/system/thunks.cc b/mojo/public/c/system/thunks.cc
index d6bfd95d1741c3b65581ca4a5818effc905673a3..1e92954a51c30b21bbde49c334aca6557896e727 100644
--- a/mojo/public/c/system/thunks.cc
+++ b/mojo/public/c/system/thunks.cc
@@ -185,17 +185,33 @@ MojoResult MojoGetReadyHandles(MojoHandle wait_set,
signals_states);
}
-MojoResult MojoWatch(MojoHandle handle,
+MojoResult MojoCreateWatcher(MojoWatcherCallback callback,
+ MojoHandle* watcher_handle) {
+ assert(g_thunks.CreateWatcher);
+ return g_thunks.CreateWatcher(callback, watcher_handle);
+}
+
+MojoResult MojoWatch(MojoHandle watcher_handle,
+ MojoHandle handle,
MojoHandleSignals signals,
- MojoWatchCallback callback,
uintptr_t context) {
assert(g_thunks.Watch);
- return g_thunks.Watch(handle, signals, callback, context);
+ return g_thunks.Watch(watcher_handle, handle, signals, context);
}
-MojoResult MojoCancelWatch(MojoHandle handle, uintptr_t context) {
+MojoResult MojoCancelWatch(MojoHandle watcher_handle, uintptr_t context) {
assert(g_thunks.CancelWatch);
- return g_thunks.CancelWatch(handle, context);
+ return g_thunks.CancelWatch(watcher_handle, context);
+}
+
+MojoResult MojoArmWatcher(MojoHandle watcher_handle,
+ uint32_t* num_ready_contexts,
+ uintptr_t* ready_contexts,
+ MojoResult* ready_results,
+ MojoHandleSignalsState* ready_signals_states) {
+ assert(g_thunks.ArmWatcher);
+ return g_thunks.ArmWatcher(watcher_handle, num_ready_contexts, ready_contexts,
+ ready_results, ready_signals_states);
}
MojoResult MojoFuseMessagePipes(MojoHandle handle0, MojoHandle handle1) {

Powered by Google App Engine
This is Rietveld 408576698