1 /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ 2 /* 3 * uio for NOLIBC 4 * Copyright (C) 2017-2021 Willy Tarreau <w@1wt.eu> 5 * Copyright (C) 2025 Intel Corporation 6 */ 7 8 /* make sure to include all global symbols */ 9 #include "../nolibc.h" 10 11 #ifndef _NOLIBC_SYS_UIO_H 12 #define _NOLIBC_SYS_UIO_H 13 14 #include "../sys.h" 15 #include <linux/uio.h> 16 17 18 /* 19 * ssize_t readv(int fd, const struct iovec *iovec, int count); 20 */ 21 static __attribute__((unused)) 22 ssize_t sys_readv(int fd, const struct iovec *iovec, int count) 23 { 24 return my_syscall3(__NR_readv, fd, iovec, count); 25 } 26 27 static __attribute__((unused)) 28 ssize_t readv(int fd, const struct iovec *iovec, int count) 29 { 30 return __sysret(sys_readv(fd, iovec, count)); 31 } 32 33 /* 34 * ssize_t writev(int fd, const struct iovec *iovec, int count); 35 */ 36 static __attribute__((unused)) 37 ssize_t sys_writev(int fd, const struct iovec *iovec, int count) 38 { 39 return my_syscall3(__NR_writev, fd, iovec, count); 40 } 41 42 static __attribute__((unused)) 43 ssize_t writev(int fd, const struct iovec *iovec, int count) 44 { 45 return __sysret(sys_writev(fd, iovec, count)); 46 } 47 48 49 #endif /* _NOLIBC_SYS_UIO_H */ 50