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 __libnacl_irt_thread; |
30 extern struct nacl_irt_thread_v0_2 __libnacl_irt_thread_v0_2; | |
Mark Seaborn
2015/08/12 01:43:07
Not needed -- see my comment in linux_pthread_priv
Luis Héctor Chávez
2015/08/12 22:14:27
Done.
| |
30 extern struct nacl_irt_futex __libnacl_irt_futex; | 31 extern struct nacl_irt_futex __libnacl_irt_futex; |
31 | 32 |
32 extern int __libnacl_irt_query(const char *interface, | 33 extern int __libnacl_irt_query(const char *interface, |
33 void *table, size_t table_size); | 34 void *table, size_t table_size); |
34 extern void __libnacl_mandatory_irt_query(const char *interface_ident, | 35 extern void __libnacl_mandatory_irt_query(const char *interface_ident, |
35 void *table, size_t table_size); | 36 void *table, size_t table_size); |
36 extern void __libnacl_irt_init(Elf32_auxv_t *auxv); | 37 extern void __libnacl_irt_init(Elf32_auxv_t *auxv); |
37 | 38 |
38 extern void __libnacl_irt_clock_init(void); | 39 extern void __libnacl_irt_clock_init(void); |
39 extern void __libnacl_irt_dev_fdio_init(void); | 40 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 | 61 * function pointer to the interface struct atomically, so that this |
61 * is thread-safe if foo_func() is called in multiple threads. | 62 * is thread-safe if foo_func() is called in multiple threads. |
62 * | 63 * |
63 * A limitation of this approach is that, if the IRT does not provide | 64 * 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 | 65 * the "foo" interface, each call to foo_func() will call the IRT's |
65 * query function. | 66 * query function. |
66 */ | 67 */ |
67 extern int __libnacl_irt_init_fn(void *interface_field, void (*init)(void)); | 68 extern int __libnacl_irt_init_fn(void *interface_field, void (*init)(void)); |
68 | 69 |
69 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ */ | 70 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ */ |
OLD | NEW |