1fbb2e0a3Schristos /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2fbb2e0a3Schristos * 3fbb2e0a3Schristos * Permission is hereby granted, free of charge, to any person obtaining a copy 4fbb2e0a3Schristos * of this software and associated documentation files (the "Software"), to 5fbb2e0a3Schristos * deal in the Software without restriction, including without limitation the 6fbb2e0a3Schristos * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7fbb2e0a3Schristos * sell copies of the Software, and to permit persons to whom the Software is 8fbb2e0a3Schristos * furnished to do so, subject to the following conditions: 9fbb2e0a3Schristos * 10fbb2e0a3Schristos * The above copyright notice and this permission notice shall be included in 11fbb2e0a3Schristos * all copies or substantial portions of the Software. 12fbb2e0a3Schristos * 13fbb2e0a3Schristos * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14fbb2e0a3Schristos * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15fbb2e0a3Schristos * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16fbb2e0a3Schristos * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17fbb2e0a3Schristos * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18fbb2e0a3Schristos * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19fbb2e0a3Schristos * IN THE SOFTWARE. 20fbb2e0a3Schristos */ 21fbb2e0a3Schristos 22fbb2e0a3Schristos #ifndef UV_LINUX_SYSCALL_H_ 23fbb2e0a3Schristos #define UV_LINUX_SYSCALL_H_ 24fbb2e0a3Schristos 25fbb2e0a3Schristos #include <stdint.h> 26fbb2e0a3Schristos #include <signal.h> 27fbb2e0a3Schristos #include <sys/types.h> 28fbb2e0a3Schristos #include <sys/time.h> 29fbb2e0a3Schristos #include <sys/socket.h> 30fbb2e0a3Schristos 31fbb2e0a3Schristos struct uv__statx_timestamp { 32fbb2e0a3Schristos int64_t tv_sec; 33fbb2e0a3Schristos uint32_t tv_nsec; 34fbb2e0a3Schristos int32_t unused0; 35fbb2e0a3Schristos }; 36fbb2e0a3Schristos 37fbb2e0a3Schristos struct uv__statx { 38fbb2e0a3Schristos uint32_t stx_mask; 39fbb2e0a3Schristos uint32_t stx_blksize; 40fbb2e0a3Schristos uint64_t stx_attributes; 41fbb2e0a3Schristos uint32_t stx_nlink; 42fbb2e0a3Schristos uint32_t stx_uid; 43fbb2e0a3Schristos uint32_t stx_gid; 44fbb2e0a3Schristos uint16_t stx_mode; 45fbb2e0a3Schristos uint16_t unused0; 46fbb2e0a3Schristos uint64_t stx_ino; 47fbb2e0a3Schristos uint64_t stx_size; 48fbb2e0a3Schristos uint64_t stx_blocks; 49fbb2e0a3Schristos uint64_t stx_attributes_mask; 50fbb2e0a3Schristos struct uv__statx_timestamp stx_atime; 51fbb2e0a3Schristos struct uv__statx_timestamp stx_btime; 52fbb2e0a3Schristos struct uv__statx_timestamp stx_ctime; 53fbb2e0a3Schristos struct uv__statx_timestamp stx_mtime; 54fbb2e0a3Schristos uint32_t stx_rdev_major; 55fbb2e0a3Schristos uint32_t stx_rdev_minor; 56fbb2e0a3Schristos uint32_t stx_dev_major; 57fbb2e0a3Schristos uint32_t stx_dev_minor; 58fbb2e0a3Schristos uint64_t unused1[14]; 59fbb2e0a3Schristos }; 60fbb2e0a3Schristos 61fbb2e0a3Schristos ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, int64_t offset); 62fbb2e0a3Schristos ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, int64_t offset); 63fbb2e0a3Schristos int uv__dup3(int oldfd, int newfd, int flags); 64*b29f2fbfSchristos ssize_t 65*b29f2fbfSchristos uv__fs_copy_file_range(int fd_in, 66*b29f2fbfSchristos off_t* off_in, 67*b29f2fbfSchristos int fd_out, 68*b29f2fbfSchristos off_t* off_out, 69*b29f2fbfSchristos size_t len, 70*b29f2fbfSchristos unsigned int flags); 71fbb2e0a3Schristos int uv__statx(int dirfd, 72fbb2e0a3Schristos const char* path, 73fbb2e0a3Schristos int flags, 74fbb2e0a3Schristos unsigned int mask, 75fbb2e0a3Schristos struct uv__statx* statxbuf); 76fbb2e0a3Schristos ssize_t uv__getrandom(void* buf, size_t buflen, unsigned flags); 77fbb2e0a3Schristos 78fbb2e0a3Schristos #endif /* UV_LINUX_SYSCALL_H_ */ 79