| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "mojo/nacl/nonsfi/irt_mojo_nonsfi.h" | 5 #include "mojo/nacl/nonsfi/irt_mojo_nonsfi.h" |
| 6 | 6 |
| 7 #include "mojo/public/c/system/buffer.h" | 7 #include "mojo/public/c/system/buffer.h" |
| 8 #include "mojo/public/c/system/data_pipe.h" | 8 #include "mojo/public/c/system/data_pipe.h" |
| 9 #include "mojo/public/c/system/handle.h" | 9 #include "mojo/public/c/system/handle.h" |
| 10 #include "mojo/public/c/system/message_pipe.h" | 10 #include "mojo/public/c/system/message_pipe.h" |
| 11 #include "mojo/public/c/system/time.h" | 11 #include "mojo/public/c/system/time.h" |
| 12 #include "mojo/public/c/system/wait.h" | 12 #include "mojo/public/c/system/wait.h" |
| 13 #include "mojo/public/platform/nacl/mgl_irt.h" | 13 #include "mojo/public/platform/nacl/mgl_irt.h" |
| 14 #include "mojo/public/platform/nacl/mojo_irt.h" | 14 #include "mojo/public/platform/nacl/mojo_irt.h" |
| 15 #include "native_client/src/public/irt_core.h" | 15 #include "native_client/src/public/irt_core.h" |
| 16 #include "native_client/src/untrusted/irt/irt_dev.h" | 16 #include "native_client/src/untrusted/irt/irt_dev.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 MojoHandle g_mojo_handle = MOJO_HANDLE_INVALID; | 20 MojoHandle g_mojo_handle = MOJO_HANDLE_INVALID; |
| 21 bool g_running_translator = false; | 21 bool g_running_translator = false; |
| 22 | 22 |
| 23 const struct nacl_irt_mojo kIrtMojo = { | 23 const struct nacl_irt_mojo kIrtMojo = { |
| 24 nacl::MojoGetInitialHandle, | 24 nacl::MojoGetInitialHandle, |
| 25 MojoGetTimeTicksNow, | 25 MojoGetTimeTicksNow, |
| 26 MojoClose, | 26 MojoClose, |
| 27 MojoGetRights, |
| 27 MojoWait, | 28 MojoWait, |
| 28 MojoWaitMany, | 29 MojoWaitMany, |
| 29 MojoCreateMessagePipe, | 30 MojoCreateMessagePipe, |
| 30 MojoWriteMessage, | 31 MojoWriteMessage, |
| 31 MojoReadMessage, | 32 MojoReadMessage, |
| 32 MojoCreateDataPipe, | 33 MojoCreateDataPipe, |
| 33 MojoSetDataPipeProducerOptions, | 34 MojoSetDataPipeProducerOptions, |
| 34 MojoGetDataPipeProducerOptions, | 35 MojoGetDataPipeProducerOptions, |
| 35 MojoWriteData, | 36 MojoWriteData, |
| 36 MojoBeginWriteData, | 37 MojoBeginWriteData, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 void* table, | 128 void* table, |
| 128 size_t tablesize) { | 129 size_t tablesize) { |
| 129 size_t result = nacl_irt_query_list(interface_ident, table, tablesize, | 130 size_t result = nacl_irt_query_list(interface_ident, table, tablesize, |
| 130 kIrtInterfaces, sizeof(kIrtInterfaces)); | 131 kIrtInterfaces, sizeof(kIrtInterfaces)); |
| 131 if (result != 0) | 132 if (result != 0) |
| 132 return result; | 133 return result; |
| 133 return nacl_irt_query_core(interface_ident, table, tablesize); | 134 return nacl_irt_query_core(interface_ident, table, tablesize); |
| 134 } | 135 } |
| 135 | 136 |
| 136 } // namespace nacl | 137 } // namespace nacl |
| OLD | NEW |