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

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

Issue 1807613002: Add MOJO_{BEGIN,END}_EXTERN_C macros, and use them. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: asdf 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
« no previous file with comments | « mojo/public/c/system/time.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // This file contains basic functions common to different Mojo system APIs. 5 // This file contains basic functions common to different Mojo system APIs.
6 // 6 //
7 // Note: This header should be compilable as C. 7 // Note: This header should be compilable as C.
8 8
9 #ifndef MOJO_PUBLIC_C_SYSTEM_WAIT_H_ 9 #ifndef MOJO_PUBLIC_C_SYSTEM_WAIT_H_
10 #define MOJO_PUBLIC_C_SYSTEM_WAIT_H_ 10 #define MOJO_PUBLIC_C_SYSTEM_WAIT_H_
11 11
12 #include "mojo/public/c/system/handle.h" 12 #include "mojo/public/c/system/handle.h"
13 #include "mojo/public/c/system/macros.h"
13 #include "mojo/public/c/system/result.h" 14 #include "mojo/public/c/system/result.h"
14 #include "mojo/public/c/system/time.h" 15 #include "mojo/public/c/system/time.h"
15 16
16 #ifdef __cplusplus 17 MOJO_BEGIN_EXTERN_C
17 extern "C" {
18 #endif
19 18
20 // Waits on the given handle until one of the following happens: 19 // Waits on the given handle until one of the following happens:
21 // - A signal indicated by |signals| is satisfied. 20 // - A signal indicated by |signals| is satisfied.
22 // - It becomes known that no signal indicated by |signals| will ever be 21 // - It becomes known that no signal indicated by |signals| will ever be
23 // satisfied. (See the description of the |MOJO_RESULT_CANCELLED| and 22 // satisfied. (See the description of the |MOJO_RESULT_CANCELLED| and
24 // |MOJO_RESULT_FAILED_PRECONDITION| return values below.) 23 // |MOJO_RESULT_FAILED_PRECONDITION| return values below.)
25 // - Until |deadline| has passed. 24 // - Until |deadline| has passed.
26 // 25 //
27 // If |deadline| is |MOJO_DEADLINE_INDEFINITE|, this will wait "forever" (until 26 // If |deadline| is |MOJO_DEADLINE_INDEFINITE|, this will wait "forever" (until
28 // one of the other wait termination conditions is satisfied). If |deadline| is 27 // one of the other wait termination conditions is satisfied). If |deadline| is
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // |MOJO_RESULT_FAILED_PRECONDITION| if it is or becomes impossible that SOME 93 // |MOJO_RESULT_FAILED_PRECONDITION| if it is or becomes impossible that SOME
95 // |handle[i]| will ever satisfy any of the signals in |signals[i]|. 94 // |handle[i]| will ever satisfy any of the signals in |signals[i]|.
96 MojoResult MojoWaitMany( 95 MojoResult MojoWaitMany(
97 const MojoHandle* handles, 96 const MojoHandle* handles,
98 const MojoHandleSignals* signals, 97 const MojoHandleSignals* signals,
99 uint32_t num_handles, 98 uint32_t num_handles,
100 MojoDeadline deadline, 99 MojoDeadline deadline,
101 uint32_t* result_index, // Optional out 100 uint32_t* result_index, // Optional out
102 struct MojoHandleSignalsState* signals_states); // Optional out 101 struct MojoHandleSignalsState* signals_states); // Optional out
103 102
104 #ifdef __cplusplus 103 MOJO_END_EXTERN_C
105 } // extern "C"
106 #endif
107 104
108 #endif // MOJO_PUBLIC_C_SYSTEM_WAIT_H_ 105 #endif // MOJO_PUBLIC_C_SYSTEM_WAIT_H_
OLDNEW
« no previous file with comments | « mojo/public/c/system/time.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698