| OLD | NEW |
| 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 // This file contains types/constants and functions specific to message pipes. | 5 // This file contains types/constants and functions specific to message pipes. |
| 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_MESSAGE_PIPE_H_ | 9 #ifndef MOJO_PUBLIC_C_SYSTEM_MESSAGE_PIPE_H_ |
| 10 #define MOJO_PUBLIC_C_SYSTEM_MESSAGE_PIPE_H_ | 10 #define MOJO_PUBLIC_C_SYSTEM_MESSAGE_PIPE_H_ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 typedef uint32_t MojoCreateMessagePipeOptionsFlags; | 24 typedef uint32_t MojoCreateMessagePipeOptionsFlags; |
| 25 | 25 |
| 26 #define MOJO_CREATE_MESSAGE_PIPE_OPTIONS_FLAG_NONE \ | 26 #define MOJO_CREATE_MESSAGE_PIPE_OPTIONS_FLAG_NONE \ |
| 27 ((MojoCreateMessagePipeOptionsFlags)0) | 27 ((MojoCreateMessagePipeOptionsFlags)0) |
| 28 | 28 |
| 29 MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); | 29 MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); |
| 30 struct MOJO_ALIGNAS(8) MojoCreateMessagePipeOptions { | 30 struct MOJO_ALIGNAS(8) MojoCreateMessagePipeOptions { |
| 31 uint32_t struct_size; | 31 uint32_t struct_size; |
| 32 MojoCreateMessagePipeOptionsFlags flags; | 32 MojoCreateMessagePipeOptionsFlags flags; |
| 33 }; | 33 }; |
| 34 MOJO_STATIC_ASSERT(sizeof(MojoCreateMessagePipeOptions) == 8, | 34 MOJO_STATIC_ASSERT(sizeof(struct MojoCreateMessagePipeOptions) == 8, |
| 35 "MojoCreateMessagePipeOptions has wrong size"); | 35 "MojoCreateMessagePipeOptions has wrong size"); |
| 36 | 36 |
| 37 // |MojoWriteMessageFlags|: Used to specify different modes to | 37 // |MojoWriteMessageFlags|: Used to specify different modes to |
| 38 // |MojoWriteMessage()|. | 38 // |MojoWriteMessage()|. |
| 39 // |MOJO_WRITE_MESSAGE_FLAG_NONE| - No flags; default mode. | 39 // |MOJO_WRITE_MESSAGE_FLAG_NONE| - No flags; default mode. |
| 40 | 40 |
| 41 typedef uint32_t MojoWriteMessageFlags; | 41 typedef uint32_t MojoWriteMessageFlags; |
| 42 | 42 |
| 43 #define MOJO_WRITE_MESSAGE_FLAG_NONE ((MojoWriteMessageFlags)0) | 43 #define MOJO_WRITE_MESSAGE_FLAG_NONE ((MojoWriteMessageFlags)0) |
| 44 | 44 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 MojoHandle message_pipe_handle, // In. | 175 MojoHandle message_pipe_handle, // In. |
| 176 void* MOJO_RESTRICT bytes, // Optional out. | 176 void* MOJO_RESTRICT bytes, // Optional out. |
| 177 uint32_t* MOJO_RESTRICT num_bytes, // Optional in/out. | 177 uint32_t* MOJO_RESTRICT num_bytes, // Optional in/out. |
| 178 MojoHandle* MOJO_RESTRICT handles, // Optional out. | 178 MojoHandle* MOJO_RESTRICT handles, // Optional out. |
| 179 uint32_t* MOJO_RESTRICT num_handles, // Optional in/out. | 179 uint32_t* MOJO_RESTRICT num_handles, // Optional in/out. |
| 180 MojoReadMessageFlags flags); // In. | 180 MojoReadMessageFlags flags); // In. |
| 181 | 181 |
| 182 MOJO_END_EXTERN_C | 182 MOJO_END_EXTERN_C |
| 183 | 183 |
| 184 #endif // MOJO_PUBLIC_C_SYSTEM_MESSAGE_PIPE_H_ | 184 #endif // MOJO_PUBLIC_C_SYSTEM_MESSAGE_PIPE_H_ |
| OLD | NEW |