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 MojoGetRights, |
| 28 MojoDuplicateHandleWithReducedRights, |
| 29 MojoDuplicateHandle, |
28 MojoWait, | 30 MojoWait, |
29 MojoWaitMany, | 31 MojoWaitMany, |
30 MojoCreateMessagePipe, | 32 MojoCreateMessagePipe, |
31 MojoWriteMessage, | 33 MojoWriteMessage, |
32 MojoReadMessage, | 34 MojoReadMessage, |
33 MojoCreateDataPipe, | 35 MojoCreateDataPipe, |
34 MojoSetDataPipeProducerOptions, | 36 MojoSetDataPipeProducerOptions, |
35 MojoGetDataPipeProducerOptions, | 37 MojoGetDataPipeProducerOptions, |
36 MojoWriteData, | 38 MojoWriteData, |
37 MojoBeginWriteData, | 39 MojoBeginWriteData, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 void* table, | 130 void* table, |
129 size_t tablesize) { | 131 size_t tablesize) { |
130 size_t result = nacl_irt_query_list(interface_ident, table, tablesize, | 132 size_t result = nacl_irt_query_list(interface_ident, table, tablesize, |
131 kIrtInterfaces, sizeof(kIrtInterfaces)); | 133 kIrtInterfaces, sizeof(kIrtInterfaces)); |
132 if (result != 0) | 134 if (result != 0) |
133 return result; | 135 return result; |
134 return nacl_irt_query_core(interface_ident, table, tablesize); | 136 return nacl_irt_query_core(interface_ident, table, tablesize); |
135 } | 137 } |
136 | 138 |
137 } // namespace nacl | 139 } // namespace nacl |
OLD | NEW |