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

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

Issue 1783623005: Add mojo/c/system/{time.h,wait.h}. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
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 MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ 5 #ifndef MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_
6 #define MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ 6 #define MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_
7 7
8 #include "mojo/public/c/system/handle.h" 8 #include "mojo/public/c/system/handle.h"
9 #include "mojo/public/c/system/result.h" 9 #include "mojo/public/c/system/result.h"
10 #include "mojo/public/c/system/types.h" 10 #include "mojo/public/c/system/time.h"
11 11
12 typedef uintptr_t MojoAsyncWaitID; 12 typedef uintptr_t MojoAsyncWaitID;
13 13
14 typedef void (*MojoAsyncWaitCallback)(void* closure, MojoResult result); 14 typedef void (*MojoAsyncWaitCallback)(void* closure, MojoResult result);
15 15
16 // Functions for asynchronously waiting (and cancelling asynchronous waits) on a 16 // Functions for asynchronously waiting (and cancelling asynchronous waits) on a
17 // handle. 17 // handle.
18 // 18 //
19 // Thread-safety: 19 // Thread-safety:
20 // - |CancelWait(wait_id)| may only be called on the same thread as the 20 // - |CancelWait(wait_id)| may only be called on the same thread as the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // 58 //
59 // Once this has been called, the callback provided to |AsyncWait()| will not 59 // Once this has been called, the callback provided to |AsyncWait()| will not
60 // be called. Moreover, it is then immediately safe to close or transfer the 60 // be called. Moreover, it is then immediately safe to close or transfer the
61 // handle provided to |AsyncWait()|. (I.e., the implementation of this 61 // handle provided to |AsyncWait()|. (I.e., the implementation of this
62 // |MojoAsyncWaiter| will no longer wait on, or do anything else with, the 62 // |MojoAsyncWaiter| will no longer wait on, or do anything else with, the
63 // handle.) 63 // handle.)
64 void (*CancelWait)(MojoAsyncWaitID wait_id); 64 void (*CancelWait)(MojoAsyncWaitID wait_id);
65 }; 65 };
66 66
67 #endif // MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ 67 #endif // MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698