Chromium Code Reviews| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 struct nacl_irt_memory { | 90 struct nacl_irt_memory { |
| 91 int (*sysbrk)(void **newbrk); | 91 int (*sysbrk)(void **newbrk); |
| 92 int (*mmap)(void **addr, size_t len, int prot, int flags, int fd, off_t off); | 92 int (*mmap)(void **addr, size_t len, int prot, int flags, int fd, off_t off); |
| 93 int (*munmap)(void *addr, size_t len); | 93 int (*munmap)(void *addr, size_t len); |
| 94 int (*mprotect)(void *addr, size_t len, int prot); | |
|
Mark Seaborn
2012/10/14 00:47:16
You can't just add to "struct nacl_irt_memory". Y
Petr Hosek
2012/10/14 00:53:21
Which one of these two is the preferred way?
Mark Seaborn
2012/10/14 00:59:49
There's no precedent here. We haven't extended an
| |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 #define NACL_IRT_DYNCODE_v0_1 "nacl-irt-dyncode-0.1" | 97 #define NACL_IRT_DYNCODE_v0_1 "nacl-irt-dyncode-0.1" |
| 97 struct nacl_irt_dyncode { | 98 struct nacl_irt_dyncode { |
| 98 int (*dyncode_create)(void *dest, const void *src, size_t size); | 99 int (*dyncode_create)(void *dest, const void *src, size_t size); |
| 99 int (*dyncode_modify)(void *dest, const void *src, size_t size); | 100 int (*dyncode_modify)(void *dest, const void *src, size_t size); |
| 100 int (*dyncode_delete)(void *dest, size_t size); | 101 int (*dyncode_delete)(void *dest, size_t size); |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 #define NACL_IRT_THREAD_v0_1 "nacl-irt-thread-0.1" | 104 #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); | 192 NaClExceptionHandler *old_handler); |
| 192 int (*exception_stack)(void *stack, size_t size); | 193 int (*exception_stack)(void *stack, size_t size); |
| 193 int (*exception_clear_flag)(void); | 194 int (*exception_clear_flag)(void); |
| 194 }; | 195 }; |
| 195 | 196 |
| 196 #if defined(__cplusplus) | 197 #if defined(__cplusplus) |
| 197 } | 198 } |
| 198 #endif | 199 #endif |
| 199 | 200 |
| 200 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H */ | 201 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H */ |
| OLD | NEW |