| 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 THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ | 12 #ifndef MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ |
| 13 #define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ | 13 #define MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ |
| 14 | 14 |
| 15 #include "third_party/mojo/src/mojo/public/c/system/macros.h" | 15 #include "mojo/public/c/system/macros.h" |
| 16 #include "third_party/mojo/src/mojo/public/c/system/system_export.h" | 16 #include "mojo/public/c/system/system_export.h" |
| 17 #include "third_party/mojo/src/mojo/public/c/system/types.h" | 17 #include "mojo/public/c/system/types.h" |
| 18 | 18 |
| 19 // |MojoCreateSharedBufferOptions|: Used to specify creation parameters for a | 19 // |MojoCreateSharedBufferOptions|: Used to specify creation parameters for a |
| 20 // shared buffer to |MojoCreateSharedBuffer()|. | 20 // shared buffer to |MojoCreateSharedBuffer()|. |
| 21 // |uint32_t struct_size|: Set to the size of the | 21 // |uint32_t struct_size|: Set to the size of the |
| 22 // |MojoCreateSharedBufferOptions| struct. (Used to allow for future | 22 // |MojoCreateSharedBufferOptions| struct. (Used to allow for future |
| 23 // extensions.) | 23 // extensions.) |
| 24 // |MojoCreateSharedBufferOptionsFlags flags|: Reserved for future use. | 24 // |MojoCreateSharedBufferOptionsFlags flags|: Reserved for future use. |
| 25 // |MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE|: No flags; default mode. | 25 // |MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE|: No flags; default mode. |
| 26 // | 26 // |
| 27 // TODO(vtl): Maybe add a flag to indicate whether the memory should be | 27 // TODO(vtl): Maybe add a flag to indicate whether the memory should be |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // Returns: | 176 // Returns: |
| 177 // |MOJO_RESULT_OK| on success. | 177 // |MOJO_RESULT_OK| on success. |
| 178 // |MOJO_RESULT_INVALID_ARGUMENT| if |buffer| is invalid (e.g., is not the | 178 // |MOJO_RESULT_INVALID_ARGUMENT| if |buffer| is invalid (e.g., is not the |
| 179 // result of |MojoMapBuffer()| or has already been unmapped). | 179 // result of |MojoMapBuffer()| or has already been unmapped). |
| 180 MOJO_SYSTEM_EXPORT MojoResult MojoUnmapBuffer(void* buffer); // In. | 180 MOJO_SYSTEM_EXPORT MojoResult MojoUnmapBuffer(void* buffer); // In. |
| 181 | 181 |
| 182 #ifdef __cplusplus | 182 #ifdef __cplusplus |
| 183 } // extern "C" | 183 } // extern "C" |
| 184 #endif | 184 #endif |
| 185 | 185 |
| 186 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ | 186 #endif // MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ |
| OLD | NEW |