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

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

Issue 2042363003: Allow data pipe producer/consumer handles to be transferred during two-phase operations. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_dp_cancel_two_phase
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/public/c/system/data_pipe.h ('k') | mojo/public/c/system/message_pipe.h » ('j') | 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 Mojo system handle-related declarations/definitions. 5 // This file contains Mojo system handle-related declarations/definitions.
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_HANDLE_H_ 9 #ifndef MOJO_PUBLIC_C_SYSTEM_HANDLE_H_
10 #define MOJO_PUBLIC_C_SYSTEM_HANDLE_H_ 10 #define MOJO_PUBLIC_C_SYSTEM_HANDLE_H_
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 MojoResult MojoGetRights(MojoHandle handle, MojoHandleRights* rights); // Out. 128 MojoResult MojoGetRights(MojoHandle handle, MojoHandleRights* rights); // Out.
129 129
130 // |MojoReplaceHandleWithReducedRights()|: Replaces |handle| with an equivalent 130 // |MojoReplaceHandleWithReducedRights()|: Replaces |handle| with an equivalent
131 // one with reduced rights. 131 // one with reduced rights.
132 // 132 //
133 // On success, |*replacement_handle| will be a handle that is equivalent to 133 // On success, |*replacement_handle| will be a handle that is equivalent to
134 // |handle| (before the call), but with: 134 // |handle| (before the call), but with:
135 // 135 //
136 // replacement handle rights = current rights & ~rights_to_remove. 136 // replacement handle rights = current rights & ~rights_to_remove.
137 // 137 //
138 // |handle| will be invalidated, and any ongoing two-phase operations (e.g., for 138 // |handle| will be invalidated and any ongoing two-phase operations (e.g., for
139 // data pipes) on |handle| will be aborted. 139 // data pipes) on |handle| will be aborted.
140 // 140 //
141 // On failure, |handle| will remain valid and unchanged (with any ongoing 141 // On failure, |handle| will remain valid and unchanged (with any ongoing
142 // two-phase operations undisturbed) and |*replacement_handle| will not be set. 142 // two-phase operations undisturbed) and |*replacement_handle| will not be set.
143 // 143 //
144 // Note that it is not an error to "remove" rights that the handle does not 144 // Note that it is not an error to "remove" rights that the handle does not
145 // (currently) possess. 145 // (currently) possess.
146 // 146 //
147 // Returns: 147 // Returns:
148 // |MOJO_RESULT_OK| on success. 148 // |MOJO_RESULT_OK| on success.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // been reached. 196 // been reached.
197 // |MOJO_RESULT_BUSY| if |handle| is currently in use in some transaction 197 // |MOJO_RESULT_BUSY| if |handle| is currently in use in some transaction
198 // (that, e.g., may result in it being invalidated, such as being sent in 198 // (that, e.g., may result in it being invalidated, such as being sent in
199 // a message). 199 // a message).
200 MojoResult MojoDuplicateHandle(MojoHandle handle, 200 MojoResult MojoDuplicateHandle(MojoHandle handle,
201 MojoHandle* new_handle); // Out. 201 MojoHandle* new_handle); // Out.
202 202
203 MOJO_END_EXTERN_C 203 MOJO_END_EXTERN_C
204 204
205 #endif // MOJO_PUBLIC_C_SYSTEM_HANDLE_H_ 205 #endif // MOJO_PUBLIC_C_SYSTEM_HANDLE_H_
OLDNEW
« no previous file with comments | « mojo/public/c/system/data_pipe.h ('k') | mojo/public/c/system/message_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698