| 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 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ | 7 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ |
| 8 #define NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ | 8 #define NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ |
| 9 | 9 |
| 10 #include <errno.h> | 10 #include <errno.h> |
| 11 | 11 |
| 12 #include "native_client/src/include/elf32.h" | 12 #include "native_client/src/include/elf32.h" |
| 13 #include "native_client/src/untrusted/irt/irt.h" | 13 #include "native_client/src/untrusted/irt/irt.h" |
| 14 #include "native_client/src/untrusted/irt/irt_dev.h" | 14 #include "native_client/src/untrusted/irt/irt_dev.h" |
| 15 | 15 |
| 16 extern TYPE_nacl_irt_query __nacl_irt_query; | 16 extern TYPE_nacl_irt_query __nacl_irt_query; |
| 17 | 17 |
| 18 /* These declarations are defined within libnacl. */ | 18 /* These declarations are defined within libnacl. */ |
| 19 extern struct nacl_irt_basic __libnacl_irt_basic; | 19 extern struct nacl_irt_basic __libnacl_irt_basic; |
| 20 extern struct nacl_irt_fdio __libnacl_irt_fdio; | 20 extern struct nacl_irt_fdio __libnacl_irt_fdio; |
| 21 extern struct nacl_irt_dev_fdio __libnacl_irt_dev_fdio; | 21 extern struct nacl_irt_dev_fdio __libnacl_irt_dev_fdio; |
| 22 extern struct nacl_irt_dev_filename __libnacl_irt_dev_filename; | 22 extern struct nacl_irt_dev_filename __libnacl_irt_dev_filename; |
| 23 extern struct nacl_irt_memory __libnacl_irt_memory; | 23 extern struct nacl_irt_memory __libnacl_irt_memory; |
| 24 extern struct nacl_irt_tls __libnacl_irt_tls; | 24 extern struct nacl_irt_tls __libnacl_irt_tls; |
| 25 extern struct nacl_irt_clock __libnacl_irt_clock; | 25 extern struct nacl_irt_clock __libnacl_irt_clock; |
| 26 extern struct nacl_irt_dev_getpid __libnacl_irt_dev_getpid; | 26 extern struct nacl_irt_dev_getpid __libnacl_irt_dev_getpid; |
| 27 | 27 |
| 28 /* These declarations are defined within libpthread. */ | 28 /* These declarations are defined within libpthread. */ |
| 29 extern struct nacl_irt_thread __libnacl_irt_thread; | 29 extern struct nacl_irt_thread_v0_2 __libnacl_irt_thread; |
| 30 extern struct nacl_irt_futex __libnacl_irt_futex; | 30 extern struct nacl_irt_futex __libnacl_irt_futex; |
| 31 | 31 |
| 32 extern int __libnacl_irt_query(const char *interface, | 32 extern int __libnacl_irt_query(const char *interface, |
| 33 void *table, size_t table_size); | 33 void *table, size_t table_size); |
| 34 extern void __libnacl_mandatory_irt_query(const char *interface_ident, | 34 extern void __libnacl_mandatory_irt_query(const char *interface_ident, |
| 35 void *table, size_t table_size); | 35 void *table, size_t table_size); |
| 36 extern void __libnacl_irt_init(Elf32_auxv_t *auxv); | 36 extern void __libnacl_irt_init(Elf32_auxv_t *auxv); |
| 37 | 37 |
| 38 extern void __libnacl_irt_clock_init(void); | 38 extern void __libnacl_irt_clock_init(void); |
| 39 extern void __libnacl_irt_dev_fdio_init(void); | 39 extern void __libnacl_irt_dev_fdio_init(void); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 60 * function pointer to the interface struct atomically, so that this | 60 * function pointer to the interface struct atomically, so that this |
| 61 * is thread-safe if foo_func() is called in multiple threads. | 61 * is thread-safe if foo_func() is called in multiple threads. |
| 62 * | 62 * |
| 63 * A limitation of this approach is that, if the IRT does not provide | 63 * A limitation of this approach is that, if the IRT does not provide |
| 64 * the "foo" interface, each call to foo_func() will call the IRT's | 64 * the "foo" interface, each call to foo_func() will call the IRT's |
| 65 * query function. | 65 * query function. |
| 66 */ | 66 */ |
| 67 extern int __libnacl_irt_init_fn(void *interface_field, void (*init)(void)); | 67 extern int __libnacl_irt_init_fn(void *interface_field, void (*init)(void)); |
| 68 | 68 |
| 69 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ */ | 69 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ */ |
| OLD | NEW |