| 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 // WARNING this file was generated by generate_nacl_bindings.py | 5 // WARNING this file was generated by generate_nacl_bindings.py |
| 6 // Do not edit by hand. | 6 // Do not edit by hand. |
| 7 | 7 |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 | 9 |
| 10 #include "mojo/public/c/system/buffer.h" | 10 #include "mojo/public/c/system/buffer.h" |
| 11 #include "mojo/public/c/system/data_pipe.h" | 11 #include "mojo/public/c/system/data_pipe.h" |
| 12 #include "mojo/public/c/system/functions.h" | |
| 13 #include "mojo/public/c/system/handle.h" | 12 #include "mojo/public/c/system/handle.h" |
| 14 #include "mojo/public/c/system/message_pipe.h" | 13 #include "mojo/public/c/system/message_pipe.h" |
| 15 #include "mojo/public/c/system/result.h" | 14 #include "mojo/public/c/system/result.h" |
| 16 #include "mojo/public/c/system/types.h" | 15 #include "mojo/public/c/system/time.h" |
| 16 #include "mojo/public/c/system/wait.h" |
| 17 #include "mojo/public/platform/nacl/mojo_irt.h" | 17 #include "mojo/public/platform/nacl/mojo_irt.h" |
| 18 #include "native_client/src/untrusted/irt/irt.h" | 18 #include "native_client/src/untrusted/irt/irt.h" |
| 19 | 19 |
| 20 bool g_irt_mojo_valid = false; | 20 bool g_irt_mojo_valid = false; |
| 21 struct nacl_irt_mojo g_irt_mojo; | 21 struct nacl_irt_mojo g_irt_mojo; |
| 22 | 22 |
| 23 struct nacl_irt_mojo* get_irt_mojo() { | 23 struct nacl_irt_mojo* get_irt_mojo() { |
| 24 if (!g_irt_mojo_valid) { | 24 if (!g_irt_mojo_valid) { |
| 25 size_t rc = nacl_interface_query(NACL_IRT_MOJO_v0_1, &g_irt_mojo, | 25 size_t rc = nacl_interface_query(NACL_IRT_MOJO_v0_1, &g_irt_mojo, |
| 26 sizeof(g_irt_mojo)); | 26 sizeof(g_irt_mojo)); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 flags); | 228 flags); |
| 229 } | 229 } |
| 230 | 230 |
| 231 MojoResult MojoUnmapBuffer(void* buffer) { | 231 MojoResult MojoUnmapBuffer(void* buffer) { |
| 232 struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); | 232 struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); |
| 233 if (!irt_mojo) | 233 if (!irt_mojo) |
| 234 abort(); | 234 abort(); |
| 235 return irt_mojo->MojoUnmapBuffer(buffer); | 235 return irt_mojo->MojoUnmapBuffer(buffer); |
| 236 } | 236 } |
| 237 | 237 |
| OLD | NEW |