| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |