aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-04-26 04:59:21 -0400
committerJens Axboe <axboe@suse.de>2006-04-26 04:59:21 -0400
commit912d35f86781e64d73be1ef358f703c08905ac37 (patch)
tree5863ad70f5cdccba0c1cd28f83d173deaf71fb83 /include
parent016b661e2f717168e600f3c85f29e1a49f88e004 (diff)
[PATCH] Add support for the sys_vmsplice syscall
sys_splice() moves data to/from pipes with a file input/output. sys_vmsplice() moves data to a pipe, with the input being a user address range instead. This uses an approach suggested by Linus, where we can hold partial ranges inside the pages[] map. Hopefully this will be useful for network receive support as well. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/unistd.h3
-rw-r--r--include/asm-ia64/unistd.h3
-rw-r--r--include/asm-powerpc/unistd.h3
-rw-r--r--include/asm-x86_64/unistd.h4
-rw-r--r--include/linux/syscalls.h3
5 files changed, 12 insertions, 4 deletions
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index d81d6cfc1bb4..eb4b152c82fc 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -321,8 +321,9 @@
321#define __NR_splice 313 321#define __NR_splice 313
322#define __NR_sync_file_range 314 322#define __NR_sync_file_range 314
323#define __NR_tee 315 323#define __NR_tee 315
324#define __NR_vmsplice 316
324 325
325#define NR_syscalls 316 326#define NR_syscalls 317
326 327
327/* 328/*
328 * user-visible error numbers are in the range -1 - -128: see 329 * user-visible error numbers are in the range -1 - -128: see
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index a40ebec6aeeb..7107763168bf 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -290,12 +290,13 @@
290#define __NR_get_robust_list 1299 290#define __NR_get_robust_list 1299
291#define __NR_sync_file_range 1300 291#define __NR_sync_file_range 1300
292#define __NR_tee 1301 292#define __NR_tee 1301
293#define __NR_vmsplice 1302
293 294
294#ifdef __KERNEL__ 295#ifdef __KERNEL__
295 296
296#include <linux/config.h> 297#include <linux/config.h>
297 298
298#define NR_syscalls 278 /* length of syscall table */ 299#define NR_syscalls 279 /* length of syscall table */
299 300
300#define __ARCH_WANT_SYS_RT_SIGACTION 301#define __ARCH_WANT_SYS_RT_SIGACTION
301 302
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h
index c612f1a62772..34325e292596 100644
--- a/include/asm-powerpc/unistd.h
+++ b/include/asm-powerpc/unistd.h
@@ -303,8 +303,9 @@
303#define __NR_unshare 282 303#define __NR_unshare 282
304#define __NR_splice 283 304#define __NR_splice 283
305#define __NR_tee 284 305#define __NR_tee 284
306#define __NR_vmsplice 285
306 307
307#define __NR_syscalls 285 308#define __NR_syscalls 286
308 309
309#ifdef __KERNEL__ 310#ifdef __KERNEL__
310#define __NR__exit __NR_exit 311#define __NR__exit __NR_exit
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index 98c36eae567c..feb77cb8c044 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -615,8 +615,10 @@ __SYSCALL(__NR_splice, sys_splice)
615__SYSCALL(__NR_tee, sys_tee) 615__SYSCALL(__NR_tee, sys_tee)
616#define __NR_sync_file_range 277 616#define __NR_sync_file_range 277
617__SYSCALL(__NR_sync_file_range, sys_sync_file_range) 617__SYSCALL(__NR_sync_file_range, sys_sync_file_range)
618#define __NR_vmsplice 278
619__SYSCALL(__NR_vmsplice, sys_vmsplice)
618 620
619#define __NR_syscall_max __NR_sync_file_range 621#define __NR_syscall_max __NR_vmsplice
620 622
621#ifndef __NO_STUBS 623#ifndef __NO_STUBS
622 624
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index d3ebc0e68b2b..3996960fc565 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -574,6 +574,9 @@ asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
574 int fd_out, loff_t __user *off_out, 574 int fd_out, loff_t __user *off_out,
575 size_t len, unsigned int flags); 575 size_t len, unsigned int flags);
576 576
577asmlinkage long sys_vmsplice(int fd, const struct iovec __user *iov,
578 unsigned long nr_segs, unsigned int flags);
579
577asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); 580asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags);
578 581
579asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, 582asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes,