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

Side by Side Diff: mojo/public/c/system/async_waiter.h

Issue 244883005: Mojo: Update/add README.md files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/public/c/gles2/gles2.h ('k') | mojo/public/c/system/tests/core_unittest_pure_c.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_PUBLIC_C_SYSTEM_ASYNC_WAITER_H_
6 #define MOJO_PUBLIC_C_SYSTEM_ASYNC_WAITER_H_
7
8 #include "mojo/public/c/system/core.h"
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 typedef uintptr_t MojoAsyncWaitID;
15
16 typedef void (*MojoAsyncWaitCallback)(void* closure, MojoResult result);
17
18 struct MojoAsyncWaiter {
19 // Asynchronously call MojoWait on a background thread, and pass the result
20 // of MojoWait to the given MojoAsyncWaitCallback on the current thread.
21 // Returns a non-zero MojoAsyncWaitID that can be used with CancelWait to
22 // stop waiting. This identifier becomes invalid once the callback runs.
23 MojoAsyncWaitID (*AsyncWait)(struct MojoAsyncWaiter* waiter,
24 MojoHandle handle,
25 MojoWaitFlags flags,
26 MojoDeadline deadline,
27 MojoAsyncWaitCallback callback,
28 void* closure);
29
30 // Cancel an existing call to AsyncWait with the given MojoAsyncWaitID. The
31 // corresponding MojoAsyncWaitCallback will not be called in this case.
32 void (*CancelWait)(struct MojoAsyncWaiter* waiter,
33 MojoAsyncWaitID wait_id);
34 };
35
36 #ifdef __cplusplus
37 } // extern "C"
38 #endif
39
40 #endif // MOJO_PUBLIC_C_SYSTEM_ASYNC_WAITER_H_
OLDNEW
« no previous file with comments | « mojo/public/c/gles2/gles2.h ('k') | mojo/public/c/system/tests/core_unittest_pure_c.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698