File: uio.h

package info (click to toggle)
linux 6.19.5-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,759,704 kB
  • sloc: ansic: 27,007,363; asm: 273,421; sh: 151,330; python: 81,278; makefile: 58,557; perl: 34,311; xml: 21,064; cpp: 5,986; yacc: 4,841; lex: 2,901; awk: 1,707; sed: 30; ruby: 25
file content (49 lines) | stat: -rw-r--r-- 1,100 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
/*
 * uio for NOLIBC
 * Copyright (C) 2017-2021 Willy Tarreau <w@1wt.eu>
 * Copyright (C) 2025 Intel Corporation
 */

/* make sure to include all global symbols */
#include "../nolibc.h"

#ifndef _NOLIBC_SYS_UIO_H
#define _NOLIBC_SYS_UIO_H

#include "../sys.h"
#include <linux/uio.h>


/*
 * ssize_t readv(int fd, const struct iovec *iovec, int count);
 */
static __attribute__((unused))
ssize_t sys_readv(int fd, const struct iovec *iovec, int count)
{
	return my_syscall3(__NR_readv, fd, iovec, count);
}

static __attribute__((unused))
ssize_t readv(int fd, const struct iovec *iovec, int count)
{
	return __sysret(sys_readv(fd, iovec, count));
}

/*
 * ssize_t writev(int fd, const struct iovec *iovec, int count);
 */
static __attribute__((unused))
ssize_t sys_writev(int fd, const struct iovec *iovec, int count)
{
	return my_syscall3(__NR_writev, fd, iovec, count);
}

static __attribute__((unused))
ssize_t writev(int fd, const struct iovec *iovec, int count)
{
	return __sysret(sys_writev(fd, iovec, count));
}


#endif /* _NOLIBC_SYS_UIO_H */