| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 #ifndef LIBRARIES_NACL_MOUNTS_KERNEL_INTERCEPT_H_ |
| 6 #define LIBRARIES_NACL_MOUNTS_KERNEL_INTERCEPT_H_ |
| 5 | 7 |
| 6 #ifndef LIBRARIES_NACL_MOUNT_KERNEL_INTERCEPT_H_ | 8 #include "nacl_mounts/ostypes.h" |
| 7 #define LIBRARIES_NACL_MOUNT_KERNEL_INTERCEPT_H_ | |
| 8 | |
| 9 #include <stdint.h> | |
| 10 | |
| 11 #include "utils/macros.h" | 9 #include "utils/macros.h" |
| 12 | 10 |
| 13 EXTERN_C_BEGIN | 11 EXTERN_C_BEGIN |
| 14 | 12 |
| 15 // The kernel intercept module provides a C->C++ thunk between the libc | 13 // The kernel intercept module provides a C->C++ thunk between the libc |
| 16 // kernel calls and the KernelProxy singleton. | 14 // kernel calls and the KernelProxy singleton. |
| 17 | 15 |
| 18 // ki_init must be called with an uninitialized KernelProxy object. Calling | 16 // ki_init must be called with an uninitialized KernelProxy object. Calling |
| 19 // with NULL will instantiate a default kernel proxy object. ki_init must | 17 // with NULL will instantiate a default kernel proxy object. ki_init must |
| 20 // be called before any other ki_XXX function can be used. | 18 // be called before any other ki_XXX function can be used. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 35 ssize_t ki_read(int fd, void* buf, size_t nbyte); | 33 ssize_t ki_read(int fd, void* buf, size_t nbyte); |
| 36 ssize_t ki_write(int fd, const void* buf, size_t nbyte); | 34 ssize_t ki_write(int fd, const void* buf, size_t nbyte); |
| 37 int ki_fstat(int fd, struct stat *buf); | 35 int ki_fstat(int fd, struct stat *buf); |
| 38 int ki_getdents(int fd, void* buf, unsigned int count); | 36 int ki_getdents(int fd, void* buf, unsigned int count); |
| 39 int ki_fsync(int fd); | 37 int ki_fsync(int fd); |
| 40 int ki_isatty(int fd); | 38 int ki_isatty(int fd); |
| 41 int ki_close(int fd); | 39 int ki_close(int fd); |
| 42 | 40 |
| 43 EXTERN_C_END | 41 EXTERN_C_END |
| 44 | 42 |
| 45 #endif // LIBRARIES_NACL_MOUNT_KERNEL_INTERCEPT_H_ | 43 #endif // LIBRARIES_NACL_MOUNTS_KERNEL_INTERCEPT_H_ |
| OLD | NEW |