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 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H_ | 6 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H_ |
7 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H_ | 7 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H_ |
8 | 8 |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 int (*getdents)(int fd, struct dirent *, size_t count, size_t *nread); | 80 int (*getdents)(int fd, struct dirent *, size_t count, size_t *nread); |
81 }; | 81 }; |
82 | 82 |
83 #define NACL_IRT_FILENAME_v0_1 "nacl-irt-filename-0.1" | 83 #define NACL_IRT_FILENAME_v0_1 "nacl-irt-filename-0.1" |
84 struct nacl_irt_filename { | 84 struct nacl_irt_filename { |
85 int (*open)(const char *pathname, int oflag, mode_t cmode, int *newfd); | 85 int (*open)(const char *pathname, int oflag, mode_t cmode, int *newfd); |
86 int (*stat)(const char *pathname, struct stat *); | 86 int (*stat)(const char *pathname, struct stat *); |
87 }; | 87 }; |
88 | 88 |
89 #define NACL_IRT_MEMORY_v0_1 "nacl-irt-memory-0.1" | 89 #define NACL_IRT_MEMORY_v0_1 "nacl-irt-memory-0.1" |
90 #define NACL_IRT_MEMORY_v0_2 "nacl-irt-memory-0.2" | |
90 struct nacl_irt_memory { | 91 struct nacl_irt_memory { |
91 int (*sysbrk)(void **newbrk); | 92 int (*sysbrk)(void **newbrk); |
92 int (*mmap)(void **addr, size_t len, int prot, int flags, int fd, off_t off); | 93 int (*mmap)(void **addr, size_t len, int prot, int flags, int fd, off_t off); |
93 int (*munmap)(void *addr, size_t len); | 94 int (*munmap)(void *addr, size_t len); |
95 int (*mprotect)(void *addr, size_t len, int prot); | |
Mark Seaborn
2012/10/18 00:27:23
Modifying struct nacl_irt_memory in-place means we
bsy
2012/10/18 19:46:09
the pattern should be something like:
struct nacl
| |
94 }; | 96 }; |
95 | 97 |
96 #define NACL_IRT_DYNCODE_v0_1 "nacl-irt-dyncode-0.1" | 98 #define NACL_IRT_DYNCODE_v0_1 "nacl-irt-dyncode-0.1" |
97 struct nacl_irt_dyncode { | 99 struct nacl_irt_dyncode { |
98 int (*dyncode_create)(void *dest, const void *src, size_t size); | 100 int (*dyncode_create)(void *dest, const void *src, size_t size); |
99 int (*dyncode_modify)(void *dest, const void *src, size_t size); | 101 int (*dyncode_modify)(void *dest, const void *src, size_t size); |
100 int (*dyncode_delete)(void *dest, size_t size); | 102 int (*dyncode_delete)(void *dest, size_t size); |
101 }; | 103 }; |
102 | 104 |
103 #define NACL_IRT_THREAD_v0_1 "nacl-irt-thread-0.1" | 105 #define NACL_IRT_THREAD_v0_1 "nacl-irt-thread-0.1" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 NaClExceptionHandler *old_handler); | 193 NaClExceptionHandler *old_handler); |
192 int (*exception_stack)(void *stack, size_t size); | 194 int (*exception_stack)(void *stack, size_t size); |
193 int (*exception_clear_flag)(void); | 195 int (*exception_clear_flag)(void); |
194 }; | 196 }; |
195 | 197 |
196 #if defined(__cplusplus) | 198 #if defined(__cplusplus) |
197 } | 199 } |
198 #endif | 200 #endif |
199 | 201 |
200 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H */ | 202 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H */ |
OLD | NEW |