OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ | 5 #ifndef MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ |
6 #define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ | 6 #define MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ |
7 | 7 |
8 #include "third_party/mojo/src/mojo/public/c/system/types.h" | 8 #include "mojo/public/c/system/types.h" |
9 | 9 |
10 typedef uintptr_t MojoAsyncWaitID; | 10 typedef uintptr_t MojoAsyncWaitID; |
11 | 11 |
12 typedef void (*MojoAsyncWaitCallback)(void* closure, MojoResult result); | 12 typedef void (*MojoAsyncWaitCallback)(void* closure, MojoResult result); |
13 | 13 |
14 // Functions for asynchronously waiting (and cancelling asynchronous waits) on a | 14 // Functions for asynchronously waiting (and cancelling asynchronous waits) on a |
15 // handle. | 15 // handle. |
16 // | 16 // |
17 // Thread-safety: | 17 // Thread-safety: |
18 // - |CancelWait(wait_id)| may only be called on the same thread as the | 18 // - |CancelWait(wait_id)| may only be called on the same thread as the |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // callback to |AsyncWait()| has not been called. | 55 // callback to |AsyncWait()| has not been called. |
56 // | 56 // |
57 // Once this has been called, the callback provided to |AsyncWait()| will not | 57 // Once this has been called, the callback provided to |AsyncWait()| will not |
58 // be called. Moreover, it is then immediately safe to close or transfer the | 58 // be called. Moreover, it is then immediately safe to close or transfer the |
59 // handle provided to |AsyncWait()|. (I.e., the implementation of this | 59 // handle provided to |AsyncWait()|. (I.e., the implementation of this |
60 // |MojoAsyncWaiter| will no longer wait on, or do anything else with, the | 60 // |MojoAsyncWaiter| will no longer wait on, or do anything else with, the |
61 // handle.) | 61 // handle.) |
62 void (*CancelWait)(MojoAsyncWaitID wait_id); | 62 void (*CancelWait)(MojoAsyncWaitID wait_id); |
63 }; | 63 }; |
64 | 64 |
65 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ | 65 #endif // MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ |
OLD | NEW |