add splice and vmsplice syscalls

based on patches by orc and Isaac Dunham.
This commit is contained in:
Rich Felker
2012-07-23 16:50:56 -04:00
parent 207460d097
commit 53147f902b
3 changed files with 28 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
#define _GNU_SOURCE
#include <fcntl.h>
#include "syscall.h"
ssize_t splice(int fd_in, off_t *off_in, int fd_out, off_t *off_out, size_t len, unsigned flags)
{
return syscall(SYS_splice, fd_in, off_in, fd_out, off_out, len, flags);
}
+8
View File
@@ -0,0 +1,8 @@
#define _GNU_SOURCE
#include <fcntl.h>
#include "syscall.h"
ssize_t vmsplice(int fd, const struct iovec *iov, size_t cnt, unsigned flags)
{
return syscall(SYS_vmsplice, fd, iov, cnt, flags);
}