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 buffers (and in | 5 // This file contains types/constants and functions specific to buffers (and in |
6 // particular shared buffers). | 6 // particular shared buffers). |
7 // TODO(vtl): Reorganize this file (etc.) to separate general buffer functions | 7 // TODO(vtl): Reorganize this file (etc.) to separate general buffer functions |
8 // from (shared) buffer creation. | 8 // from (shared) buffer creation. |
9 // | 9 // |
10 // Note: This header should be compilable as C. | 10 // Note: This header should be compilable as C. |
11 | 11 |
12 #ifndef MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ | 12 #ifndef MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ |
13 #define MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ | 13 #define MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ |
14 | 14 |
| 15 #include <stdint.h> |
| 16 |
15 #include "mojo/public/c/system/macros.h" | 17 #include "mojo/public/c/system/macros.h" |
16 #include "mojo/public/c/system/system_export.h" | 18 #include "mojo/public/c/system/system_export.h" |
17 #include "mojo/public/c/system/types.h" | 19 #include "mojo/public/c/system/types.h" |
18 | 20 |
19 // |MojoCreateSharedBufferOptions|: Used to specify creation parameters for a | 21 // |MojoCreateSharedBufferOptions|: Used to specify creation parameters for a |
20 // shared buffer to |MojoCreateSharedBuffer()|. | 22 // shared buffer to |MojoCreateSharedBuffer()|. |
21 // |uint32_t struct_size|: Set to the size of the | 23 // |uint32_t struct_size|: Set to the size of the |
22 // |MojoCreateSharedBufferOptions| struct. (Used to allow for future | 24 // |MojoCreateSharedBufferOptions| struct. (Used to allow for future |
23 // extensions.) | 25 // extensions.) |
24 // |MojoCreateSharedBufferOptionsFlags flags|: Reserved for future use. | 26 // |MojoCreateSharedBufferOptionsFlags flags|: Reserved for future use. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // |MOJO_RESULT_OK| on success. | 179 // |MOJO_RESULT_OK| on success. |
178 // |MOJO_RESULT_INVALID_ARGUMENT| if |buffer| is invalid (e.g., is not the | 180 // |MOJO_RESULT_INVALID_ARGUMENT| if |buffer| is invalid (e.g., is not the |
179 // result of |MojoMapBuffer()| or has already been unmapped). | 181 // result of |MojoMapBuffer()| or has already been unmapped). |
180 MOJO_SYSTEM_EXPORT MojoResult MojoUnmapBuffer(void* buffer); // In. | 182 MOJO_SYSTEM_EXPORT MojoResult MojoUnmapBuffer(void* buffer); // In. |
181 | 183 |
182 #ifdef __cplusplus | 184 #ifdef __cplusplus |
183 } // extern "C" | 185 } // extern "C" |
184 #endif | 186 #endif |
185 | 187 |
186 #endif // MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ | 188 #endif // MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ |
OLD | NEW |