diff options
-rw-r--r-- | mojo/public/platform/native/system_thunks.cc | 13 | ||||
-rw-r--r-- | mojo/public/platform/native/system_thunks.h | 9 |
2 files changed, 21 insertions, 1 deletions
diff --git a/mojo/public/platform/native/system_thunks.cc b/mojo/public/platform/native/system_thunks.cc index 3af7d58..fd14d48 100644 --- a/mojo/public/platform/native/system_thunks.cc +++ b/mojo/public/platform/native/system_thunks.cc @@ -187,6 +187,19 @@ MojoResult MojoGetReadyHandles(MojoHandle wait_set, signals_states); } +MojoResult MojoWatch(MojoHandle handle, + MojoHandleSignals signals, + MojoWatchCallback callback, + uintptr_t context) { + assert(g_thunks.Watch); + return g_thunks.Watch(handle, signals, callback, context); +} + +MojoResult MojoCancelWatch(MojoHandle handle, uintptr_t context) { + assert(g_thunks.CancelWatch); + return g_thunks.CancelWatch(handle, context); +} + extern "C" THUNK_EXPORT size_t MojoSetSystemThunks( const MojoSystemThunks* system_thunks) { if (system_thunks->size >= sizeof(g_thunks)) diff --git a/mojo/public/platform/native/system_thunks.h b/mojo/public/platform/native/system_thunks.h index 393ee40..b50970e 100644 --- a/mojo/public/platform/native/system_thunks.h +++ b/mojo/public/platform/native/system_thunks.h @@ -114,6 +114,11 @@ struct MojoSystemThunks { MojoHandle* handles, MojoResult* results, struct MojoHandleSignalsState* signals_states); + MojoResult (*Watch)(MojoHandle handle, + MojoHandleSignals signals, + MojoWatchCallback callback, + uintptr_t context); + MojoResult (*CancelWatch)(MojoHandle handle, uintptr_t context); }; #pragma pack(pop) @@ -144,7 +149,9 @@ inline MojoSystemThunks MojoMakeSystemThunks() { MojoCreateWaitSet, MojoAddHandle, MojoRemoveHandle, - MojoGetReadyHandles}; + MojoGetReadyHandles, + MojoWatch, + MojoCancelWatch}; return system_thunks; } #endif |