summaryrefslogtreecommitdiffstats
path: root/mojo/public/cpp/environment/lib/default_async_waiter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mojo/public/cpp/environment/lib/default_async_waiter.cc')
-rw-r--r--mojo/public/cpp/environment/lib/default_async_waiter.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/mojo/public/cpp/environment/lib/default_async_waiter.cc b/mojo/public/cpp/environment/lib/default_async_waiter.cc
index 73e41de..4dcbe47 100644
--- a/mojo/public/cpp/environment/lib/default_async_waiter.cc
+++ b/mojo/public/cpp/environment/lib/default_async_waiter.cc
@@ -58,8 +58,7 @@ class RunLoopHandlerImpl : public RunLoopHandler {
MOJO_DISALLOW_COPY_AND_ASSIGN(RunLoopHandlerImpl);
};
-MojoAsyncWaitID AsyncWait(MojoAsyncWaiter* waiter,
- MojoHandle handle,
+MojoAsyncWaitID AsyncWait(MojoHandle handle,
MojoWaitFlags flags,
MojoDeadline deadline,
MojoAsyncWaitCallback callback,
@@ -75,19 +74,19 @@ MojoAsyncWaitID AsyncWait(MojoAsyncWaiter* waiter,
return reinterpret_cast<MojoAsyncWaitID>(run_loop_handler);
}
-void CancelWait(MojoAsyncWaiter* waiter, MojoAsyncWaitID wait_id) {
+void CancelWait(MojoAsyncWaitID wait_id) {
delete reinterpret_cast<RunLoopHandlerImpl*>(wait_id);
}
-MojoAsyncWaiter s_default_async_waiter = {
+const MojoAsyncWaiter kDefaultAsyncWaiter = {
AsyncWait,
CancelWait
};
} // namespace
-MojoAsyncWaiter* GetDefaultAsyncWaiter() {
- return &s_default_async_waiter;
+const MojoAsyncWaiter* GetDefaultAsyncWaiter() {
+ return &kDefaultAsyncWaiter;
}
} // namespace mojo