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