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