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

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

Issue 2100553002: Add Core methods for wait set. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_wait_set_5.4
Patch Set: Created 4 years, 6 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/edk/system/wait_set_dispatcher_unittest.cc ('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 functions for waiting on multiple handles using wait sets. 5 // This file contains functions for waiting on multiple handles using wait sets.
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_SET_H_ 9 #ifndef MOJO_PUBLIC_C_SYSTEM_WAIT_SET_H_
10 #define MOJO_PUBLIC_C_SYSTEM_WAIT_SET_H_ 10 #define MOJO_PUBLIC_C_SYSTEM_WAIT_SET_H_
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // |MOJO_RESULT_INVALID_ARGUMENT| if |wait_set_handle| or |handle| do not 101 // |MOJO_RESULT_INVALID_ARGUMENT| if |wait_set_handle| or |handle| do not
102 // refer to valid handles, |wait_set_handle| is not a handle to a wait 102 // refer to valid handles, |wait_set_handle| is not a handle to a wait
103 // set, or |options| is not null and |*options| is not a valid options 103 // set, or |options| is not null and |*options| is not a valid options
104 // structure. 104 // structure.
105 // |MOJO_RESULT_ALREADY_EXISTS| if there is already an entry in the wait set 105 // |MOJO_RESULT_ALREADY_EXISTS| if there is already an entry in the wait set
106 // with the same |cookie| value. 106 // with the same |cookie| value.
107 // |MOJO_RESULT_BUSY| if |wait_set_handle| or |handle| are currently in use in 107 // |MOJO_RESULT_BUSY| if |wait_set_handle| or |handle| are currently in use in
108 // some transaction. 108 // some transaction.
109 // |MOJO_RESULT_RESOURCE_EXHAUSTED| if the handle could not be added due to 109 // |MOJO_RESULT_RESOURCE_EXHAUSTED| if the handle could not be added due to
110 // hitting a system or quota limitation. 110 // hitting a system or quota limitation.
111 MojoResult MojoWaitSetAdd(const struct MojoWaitSetAddOptions* MOJO_RESTRICT 111 MojoResult MojoWaitSetAdd(MojoHandle wait_set_handle, // In.
112 options, // Optional in.
113 MojoHandle wait_set_handle, // In.
114 MojoHandle handle, // In. 112 MojoHandle handle, // In.
115 MojoHandleSignals signals, // In. 113 MojoHandleSignals signals, // In.
116 uint64_t cookie); // In. 114 uint64_t cookie, // In.
115 const struct MojoWaitSetAddOptions* MOJO_RESTRICT
116 options); // Optional in.
117 117
118 // |MojoWaitSetRemove()|: Removes an entry from the wait set specified by 118 // |MojoWaitSetRemove()|: Removes an entry from the wait set specified by
119 // |wait_set_handle| (which must have the |MOJO_HANDLE_RIGHT_WRITE| right). 119 // |wait_set_handle| (which must have the |MOJO_HANDLE_RIGHT_WRITE| right).
120 // 120 //
121 // Returns: 121 // Returns:
122 // |MOJO_RESULT_OK| if the entry was successfully removed. 122 // |MOJO_RESULT_OK| if the entry was successfully removed.
123 // |MOJO_RESULT_INVALID_ARGUMENT| if |wait_set_handle| does not refer to a 123 // |MOJO_RESULT_INVALID_ARGUMENT| if |wait_set_handle| does not refer to a
124 // valid wait set. 124 // valid wait set.
125 // |MOJO_RESULT_NOT_FOUND| if |cookie| does not identify an entry within the 125 // |MOJO_RESULT_NOT_FOUND| if |cookie| does not identify an entry within the
126 // wait set. 126 // wait set.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 MojoResult MojoWaitSetWait( 179 MojoResult MojoWaitSetWait(
180 MojoHandle wait_set_handle, // In. 180 MojoHandle wait_set_handle, // In.
181 MojoDeadline deadline, // In. 181 MojoDeadline deadline, // In.
182 uint32_t* MOJO_RESTRICT num_results, // In/out. 182 uint32_t* MOJO_RESTRICT num_results, // In/out.
183 struct MojoWaitSetResult* MOJO_RESTRICT results, // Out. 183 struct MojoWaitSetResult* MOJO_RESTRICT results, // Out.
184 uint32_t* MOJO_RESTRICT max_results); // Optional out. 184 uint32_t* MOJO_RESTRICT max_results); // Optional out.
185 185
186 MOJO_END_EXTERN_C 186 MOJO_END_EXTERN_C
187 187
188 #endif // MOJO_PUBLIC_C_SYSTEM_WAIT_SET_H_ 188 #endif // MOJO_PUBLIC_C_SYSTEM_WAIT_SET_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/wait_set_dispatcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698