diff options
author | rockot <rockot@chromium.org> | 2016-03-01 19:46:37 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-02 03:48:53 +0000 |
commit | 49b69e6b27a12426ba56b6b5271ccec9b54c94c2 (patch) | |
tree | 503a0782b56020a0e95dc50035f447c4c5ad81b3 /mojo/edk/system/dispatcher.h | |
parent | eff7ca929ee4c19c2f8bb2544a31009599217bd1 (diff) | |
download | chromium_src-49b69e6b27a12426ba56b6b5271ccec9b54c94c2.zip chromium_src-49b69e6b27a12426ba56b6b5271ccec9b54c94c2.tar.gz chromium_src-49b69e6b27a12426ba56b6b5271ccec9b54c94c2.tar.bz2 |
[mojo-edk] Add MojoWatch and MojoCancelWatch APIs
This adds MojoWatch() and MojoCancelWatch() APIs to support
efficient asynchronous handle event notifications.
BUG=590495
Review URL: https://codereview.chromium.org/1748503002
Cr-Commit-Position: refs/heads/master@{#378677}
Diffstat (limited to 'mojo/edk/system/dispatcher.h')
-rw-r--r-- | mojo/edk/system/dispatcher.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mojo/edk/system/dispatcher.h b/mojo/edk/system/dispatcher.h index 89876eb..e8bcf33 100644 --- a/mojo/edk/system/dispatcher.h +++ b/mojo/edk/system/dispatcher.h @@ -20,6 +20,7 @@ #include "mojo/edk/system/handle_signals_state.h" #include "mojo/edk/system/ports/name.h" #include "mojo/edk/system/system_impl_export.h" +#include "mojo/edk/system/watcher.h" #include "mojo/public/c/system/buffer.h" #include "mojo/public/c/system/data_pipe.h" #include "mojo/public/c/system/message_pipe.h" @@ -65,6 +66,14 @@ class MOJO_SYSTEM_IMPL_EXPORT Dispatcher virtual Type GetType() const = 0; virtual MojoResult Close() = 0; + ///////////// Watch API //////////////////// + + virtual MojoResult Watch(MojoHandleSignals signals, + const Watcher::WatchCallback& callback, + uintptr_t context); + + virtual MojoResult CancelWatch(uintptr_t context); + ///////////// Message pipe API ///////////// virtual MojoResult WriteMessage(const void* bytes, |