linux/arch/x86
Gerd Hoffmann f3554f4bc6 preadv/pwritev: Add preadv and pwritev system calls.
This patch adds preadv and pwritev system calls.  These syscalls are a
pretty straightforward combination of pread and readv (same for write).
They are quite useful for doing vectored I/O in threaded applications.
Using lseek+readv instead opens race windows you'll have to plug with
locking.

Other systems have such system calls too, for example NetBSD, check
here: http://www.daemon-systems.org/man/preadv.2.html

The application-visible interface provided by glibc should look like
this to be compatible to the existing implementations in the *BSD family:

  ssize_t preadv(int d, const struct iovec *iov, int iovcnt, off_t offset);
  ssize_t pwritev(int d, const struct iovec *iov, int iovcnt, off_t offset);

This prototype has one problem though: On 32bit archs is the (64bit)
offset argument unaligned, which the syscall ABI of several archs doesn't
allow to do.  At least s390 needs a wrapper in glibc to handle this.  As
we'll need a wrappers in glibc anyway I've decided to push problem to
glibc entriely and use a syscall prototype which works without
arch-specific wrappers inside the kernel: The offset argument is
explicitly splitted into two 32bit values.

The patch sports the actual system call implementation and the windup in
the x86 system call tables.  Other archs follow as separate patches.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <linux-api@vger.kernel.org>
Cc: <linux-arch@vger.kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-02 19:05:08 -07:00
..
boot x86, setup: guard against pre-ACPI 3 e820 code not updating %ecx 2009-04-01 11:35:00 -07:00
configs Merge branches 'x86/apic', 'x86/defconfig', 'x86/memtest', 'x86/mm' and 'linus' into x86/core 2009-02-26 06:31:32 +01:00
crypto crypto: aes-ni - Add support to Intel AES-NI instructions for x86_64 platform 2009-02-18 16:48:06 +08:00
ia32 preadv/pwritev: Add preadv and pwritev system calls. 2009-04-02 19:05:08 -07:00
include/asm preadv/pwritev: Add preadv and pwritev system calls. 2009-04-02 19:05:08 -07:00
kernel preadv/pwritev: Add preadv and pwritev system calls. 2009-04-02 19:05:08 -07:00
kvm KVM: VMX: Don't allow uninhibited access to EFER on i386 2009-03-24 11:03:15 +02:00
lguest Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest-and-virtio 2009-03-30 17:57:39 -07:00
lib x86: memcpy, clean up 2009-03-12 12:21:17 +01:00
math-emu Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
mm mm: use debug_kmap_atomic 2009-04-01 08:59:14 -07:00
oprofile x86: oprofile: don't set counter width from cpuid on Core2 2009-03-03 12:04:22 +01:00
pci Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-04-01 09:47:12 -07:00
power pm: rework includes, remove arch ifdefs 2009-04-01 08:59:16 -07:00
vdso x86, mm: rename TASK_SIZE64 => TASK_SIZE_MAX 2009-02-21 00:09:44 +01:00
video x86: video/fbdev.c: add MODULE_LICENSE 2008-05-04 20:04:46 +02:00
xen x86: with the last user gone, remove set_pte_present 2009-03-19 14:04:19 +01:00
Kconfig generic debug pagealloc 2009-04-01 08:59:13 -07:00
Kconfig.cpu x86/centaur: merge 32 & 64 bit version 2009-03-14 16:27:29 +01:00
Kconfig.debug generic debug pagealloc: build fix 2009-04-02 19:04:48 -07:00
Makefile x86: use targets in the boot Makefile instead of CLEAN_FILES 2009-03-12 13:43:14 -07:00
Makefile_32.cpu x86: merge winchip-2 and winchip-2a cpu choices 2008-10-13 10:22:48 +02:00