OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 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 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 | 9 |
10 #include "native_client/src/untrusted/irt/irt_interfaces.h" | 10 #include "native_client/src/untrusted/irt/irt_interfaces.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 struct nacl_irt_basic __libnacl_irt_basic; | 46 struct nacl_irt_basic __libnacl_irt_basic; |
47 struct nacl_irt_memory __libnacl_irt_memory; | 47 struct nacl_irt_memory __libnacl_irt_memory; |
48 struct nacl_irt_tls __libnacl_irt_tls; | 48 struct nacl_irt_tls __libnacl_irt_tls; |
49 struct nacl_irt_clock __libnacl_irt_clock; | 49 struct nacl_irt_clock __libnacl_irt_clock; |
50 struct nacl_irt_dev_getpid __libnacl_irt_dev_getpid; | 50 struct nacl_irt_dev_getpid __libnacl_irt_dev_getpid; |
51 | 51 |
52 struct nacl_irt_dev_filename __libnacl_irt_dev_filename; | 52 struct nacl_irt_dev_filename __libnacl_irt_dev_filename; |
53 struct nacl_irt_dev_fdio __libnacl_irt_dev_fdio; | 53 struct nacl_irt_dev_fdio __libnacl_irt_dev_fdio; |
| 54 struct nacl_irt_dev_process __libnacl_irt_dev_process; |
54 | 55 |
55 struct nacl_irt_fdio __libnacl_irt_fdio = { | 56 struct nacl_irt_fdio __libnacl_irt_fdio = { |
56 stub_close, | 57 stub_close, |
57 stub_dup, | 58 stub_dup, |
58 stub_dup2, | 59 stub_dup2, |
59 stub_read, | 60 stub_read, |
60 stub_write, | 61 stub_write, |
61 stub_seek, | 62 stub_seek, |
62 stub_fstat, | 63 stub_fstat, |
63 stub_getdents, | 64 stub_getdents, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 int __libnacl_irt_init_fn(void *interface_field, void (*init)(void)) { | 132 int __libnacl_irt_init_fn(void *interface_field, void (*init)(void)) { |
132 if (*((void **) interface_field) == NULL) { | 133 if (*((void **) interface_field) == NULL) { |
133 init(); | 134 init(); |
134 if (*((void **) interface_field) == NULL) { | 135 if (*((void **) interface_field) == NULL) { |
135 errno = ENOSYS; | 136 errno = ENOSYS; |
136 return 0; | 137 return 0; |
137 } | 138 } |
138 } | 139 } |
139 return 1; | 140 return 1; |
140 } | 141 } |
OLD | NEW |