OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H_ | 6 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H_ |
7 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H_ | 7 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H_ |
8 | 8 |
9 #include <stdarg.h> | 9 #include <stdarg.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 struct nacl_irt_dev_list_mappings { | 111 struct nacl_irt_dev_list_mappings { |
112 int (*list_mappings)(struct NaClMemMappingInfo *regions, | 112 int (*list_mappings)(struct NaClMemMappingInfo *regions, |
113 size_t count, size_t *result_count); | 113 size_t count, size_t *result_count); |
114 }; | 114 }; |
115 | 115 |
116 #define NACL_IRT_DEV_GETPID_v0_1 "nacl-irt-dev-getpid-0.1" | 116 #define NACL_IRT_DEV_GETPID_v0_1 "nacl-irt-dev-getpid-0.1" |
117 struct nacl_irt_dev_getpid { | 117 struct nacl_irt_dev_getpid { |
118 int (*getpid)(int *pid); | 118 int (*getpid)(int *pid); |
119 }; | 119 }; |
120 | 120 |
| 121 /* |
| 122 * This is an internal interface, for use by PNaCl's sandboxed linker for |
| 123 * communicating with the browser. |
| 124 * |
| 125 * serve_link_request(func) waits for a request via IPC, and then calls |
| 126 * func(), on the same thread. |
| 127 * |
| 128 * |nexe_fd| is a writable FD for the linker to write its output to. |
| 129 * |obj_file_fds| is an array of readable FDs (of length |
| 130 * |obj_file_fd_count|) of input object files. func() returns zero on |
| 131 * success or a non-zero value on error. |
| 132 */ |
| 133 #define NACL_IRT_PRIVATE_PNACL_TRANSLATOR_LINK_v0_1 \ |
| 134 "nacl-irt-private-pnacl-translator-link-0.1" |
| 135 struct nacl_irt_private_pnacl_translator_link { |
| 136 void (*serve_link_request)(int (*func)(int nexe_fd, |
| 137 const int *obj_file_fds, |
| 138 int obj_file_fd_count)); |
| 139 }; |
| 140 |
121 #if defined(__cplusplus) | 141 #if defined(__cplusplus) |
122 } | 142 } |
123 #endif | 143 #endif |
124 | 144 |
125 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H */ | 145 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H */ |
OLD | NEW |