Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: src/untrusted/nacl/nacl_irt.h

Issue 24908002: Provide IRT process interface Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/untrusted/nacl/nacl.scons ('k') | src/untrusted/nacl/nacl_irt.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 extern struct nacl_irt_basic __libnacl_irt_basic; 18 extern struct nacl_irt_basic __libnacl_irt_basic;
19 extern struct nacl_irt_fdio __libnacl_irt_fdio; 19 extern struct nacl_irt_fdio __libnacl_irt_fdio;
20 extern struct nacl_irt_dev_fdio __libnacl_irt_dev_fdio; 20 extern struct nacl_irt_dev_fdio __libnacl_irt_dev_fdio;
21 extern struct nacl_irt_dev_filename __libnacl_irt_dev_filename; 21 extern struct nacl_irt_dev_filename __libnacl_irt_dev_filename;
22 extern struct nacl_irt_memory __libnacl_irt_memory; 22 extern struct nacl_irt_memory __libnacl_irt_memory;
23 extern struct nacl_irt_tls __libnacl_irt_tls; 23 extern struct nacl_irt_tls __libnacl_irt_tls;
24 extern struct nacl_irt_clock __libnacl_irt_clock; 24 extern struct nacl_irt_clock __libnacl_irt_clock;
25 extern struct nacl_irt_dev_getpid __libnacl_irt_dev_getpid; 25 extern struct nacl_irt_dev_getpid __libnacl_irt_dev_getpid;
26 extern struct nacl_irt_dev_process __libnacl_irt_dev_process;
26 27
27 extern int __libnacl_irt_query(const char *interface, 28 extern int __libnacl_irt_query(const char *interface,
28 void *table, size_t table_size); 29 void *table, size_t table_size);
29 extern void __libnacl_mandatory_irt_query(const char *interface_ident, 30 extern void __libnacl_mandatory_irt_query(const char *interface_ident,
30 void *table, size_t table_size); 31 void *table, size_t table_size);
31 extern void __libnacl_irt_init(Elf32_auxv_t *auxv); 32 extern void __libnacl_irt_init(Elf32_auxv_t *auxv);
32 33
33 extern void __libnacl_irt_dev_fdio_init(void); 34 extern void __libnacl_irt_dev_fdio_init(void);
34 extern void __libnacl_irt_dev_filename_init(void); 35 extern void __libnacl_irt_dev_filename_init(void);
36 extern void __libnacl_irt_dev_process_init(void);
35 37
36 extern int __libnacl_irt_init_fn(void *interface_field, void (*init)(void)); 38 extern int __libnacl_irt_init_fn(void *interface_field, void (*init)(void));
37 39
38 /* 40 /*
39 * NACL_OPTIONAL_FN is used to create libc wrapper functions. 41 * NACL_OPTIONAL_FN is used to create libc wrapper functions.
40 * 42 *
41 * iface is the "name" of the IRT interface, where nacl_irt_ ## iface 43 * iface is the "name" of the IRT interface, where nacl_irt_ ## iface
42 * is the struct tag and __libnacl_irt_ ## iface is the name of the 44 * is the struct tag and __libnacl_irt_ ## iface is the name of the
43 * irt variable containing the function pointers. 45 * irt variable containing the function pointers.
44 * 46 *
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } \ 87 } \
86 error = iface_obj.fname arglist; \ 88 error = iface_obj.fname arglist; \
87 if (0 != error) { \ 89 if (0 != error) { \
88 errno = error; \ 90 errno = error; \
89 return -1; \ 91 return -1; \
90 } \ 92 } \
91 return 0; \ 93 return 0; \
92 } 94 }
93 95
94 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ */ 96 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_NACL_IRT_H_ */
OLDNEW
« no previous file with comments | « src/untrusted/nacl/nacl.scons ('k') | src/untrusted/nacl/nacl_irt.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698