1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Worker /*
3*49cdfc7eSAndroid Build Coastguard Worker * Copyright (c) International Business Machines Corp., 2007
4*49cdfc7eSAndroid Build Coastguard Worker * Copyright (c) 2014 Cyril Hrubis <[email protected]>
5*49cdfc7eSAndroid Build Coastguard Worker */
6*49cdfc7eSAndroid Build Coastguard Worker
7*49cdfc7eSAndroid Build Coastguard Worker #ifndef LAPI_VMSPLICE_H__
8*49cdfc7eSAndroid Build Coastguard Worker #define LAPI_VMSPLICE_H__
9*49cdfc7eSAndroid Build Coastguard Worker
10*49cdfc7eSAndroid Build Coastguard Worker #include "config.h"
11*49cdfc7eSAndroid Build Coastguard Worker #include "lapi/syscalls.h"
12*49cdfc7eSAndroid Build Coastguard Worker
13*49cdfc7eSAndroid Build Coastguard Worker #include "lapi/iovec.h"
14*49cdfc7eSAndroid Build Coastguard Worker
15*49cdfc7eSAndroid Build Coastguard Worker #if !defined(HAVE_VMSPLICE)
vmsplice(int fd,const struct iovec * iov,unsigned long nr_segs,unsigned int flags)16*49cdfc7eSAndroid Build Coastguard Worker static inline ssize_t vmsplice(int fd, const struct iovec *iov,
17*49cdfc7eSAndroid Build Coastguard Worker unsigned long nr_segs, unsigned int flags)
18*49cdfc7eSAndroid Build Coastguard Worker {
19*49cdfc7eSAndroid Build Coastguard Worker return tst_syscall(__NR_vmsplice, fd, iov, nr_segs, flags);
20*49cdfc7eSAndroid Build Coastguard Worker }
21*49cdfc7eSAndroid Build Coastguard Worker #endif
22*49cdfc7eSAndroid Build Coastguard Worker
23*49cdfc7eSAndroid Build Coastguard Worker #endif /* LAPI_VMSPLICE_H__ */
24