]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/vmsplice.2
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir...
[thirdparty/man-pages.git] / man2 / vmsplice.2
index cd89038fb70729b41b11d9b3373fb54fc81073d3..9a9aff5896c6c361ba7736c42214d2bb3cbad773 100644 (file)
@@ -1,8 +1,7 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" This manpage is Copyright (C) 2006 Jens Axboe
 .\" and Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
-.TH VMSPLICE 2 2006-04-28 "Linux" "Linux Programmer's Manual"
+.TH VMSPLICE 2 2012-05-04 "Linux" "Linux Programmer's Manual"
 .SH NAME
 vmsplice \- splice user pages into a pipe
 .SH SYNOPSIS
 .nf
-.B #define _GNU_SOURCE
+.BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
 .B #include <fcntl.h>
 .B #include <sys/uio.h>
 
-.BI "long vmsplice(int " fd ", const struct iovec *" iov ,
-.BI "              unsigned long " nr_segs ", unsigned int " flags );
+.BI "ssize_t vmsplice(int " fd ", const struct iovec *" iov ,
+.BI "                 unsigned long " nr_segs ", unsigned int " flags );
 .fi
+.\" Return type was long before glibc 2.7
 .SH DESCRIPTION
 .\" Linus: vmsplice() system call to basically do a "write to
 .\" the buffer", but using the reference counting and VM traversal
 .\" to actually fill the buffer. This means that the user needs to
-.\" be careful not to re-use the user-space buffer it spliced into
+.\" be careful not to reuse the user-space buffer it spliced into
 .\" the kernel-space one (contrast this to "write()", which copies
-.\" the actual data, and you can thus re-use the buffer immediately
+.\" the actual data, and you can thus reuse the buffer immediately
 .\" after a successful write), but that is often easy to do.
 The
 .BR vmsplice ()
@@ -61,13 +62,13 @@ points to an array of
 structures as defined in
 .IR <sys/uio.h> :
 
-.in +0.25i
+.in +4n
 .nf
 struct iovec {
     void  *iov_base;            /* Starting address */
     size_t iov_len;             /* Number of bytes */
 };
-.in -0.25i
+.in
 .fi
 
 The
@@ -137,9 +138,10 @@ Out of memory.
 .SH VERSIONS
 The
 .BR vmsplice ()
-system call first appeared in Linux 2.6.17.
-.SH "CONFORMING TO"
-This system call is Linux specific.
+system call first appeared in Linux 2.6.17;
+library support was added to glibc in version 2.5.
+.SH CONFORMING TO
+This system call is Linux-specific.
 .SH NOTES
 .BR vmsplice ()
 follows the other vectorized read/write type functions when it comes to
@@ -151,5 +153,4 @@ as defined in
 At the time of this writing, that limit is 1024.
 .SH SEE ALSO
 .BR splice (2),
-.BR tee (2),
-.BR feature_test_macros (7)
+.BR tee (2)