1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" This manpage is Copyright (C) 2006 Jens Axboe
4 .\" and Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date. The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein. The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" Japanese Version Copyright (c) 2007 Akihiro MOTOKI
27 .\" all rights reserved.
28 .\" Translated 2007-02-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
30 .TH VMSPLICE 2 2009-09-15 "Linux" "Linux Programmer's Manual"
32 .\"O vmsplice \- splice user pages into a pipe
34 vmsplice \- ユーザ・ページをパイプに継ぎ合わせる
38 .\"O .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
39 .BR "#define _GNU_SOURCE" " /* feature_test_macros(7) 参照 */"
41 .B #include <sys/uio.h>
43 .BI "ssize_t vmsplice(int " fd ", const struct iovec *" iov ,
44 .BI " unsigned long " nr_segs ", unsigned int " flags );
46 .\" Return type was long before glibc 2.7
49 .\" Linus: vmsplice() system call to basically do a "write to
50 .\" the buffer", but using the reference counting and VM traversal
51 .\" to actually fill the buffer. This means that the user needs to
52 .\" be careful not to reuse the user-space buffer it spliced into
53 .\" the kernel-space one (contrast this to "write()", which copies
54 .\" the actual data, and you can thus reuse the buffer immediately
55 .\" after a successful write), but that is often easy to do.
60 .\"O ranges of user memory described by
63 .\"O The file descriptor
65 .\"O must refer to a pipe.
77 .\"O points to an array of
79 .\"O structures as defined in
80 .\"O .IR <sys/uio.h> :
94 .\"O void *iov_base; /* Starting address */
95 .\"O size_t iov_len; /* Number of bytes */
96 void *iov_base; /* 開始アドレス */
97 size_t iov_len; /* バイト数 */
104 .\"O argument is a bit mask that is composed by ORing together
105 .\"O zero or more of the following values:
107 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。
111 .\"O .BR vmsplice ();
120 .\" Not used for vmsplice
121 .\" May be in the future -- therefore EAGAIN
122 .\"O Do not block on I/O; see
124 .\"O for further details.
125 入出力で停止 (block) しない。詳細は
130 .\"O Currently has no effect for
131 .\"O .BR vmsplice (),
132 .\"O but may be implemented in the future; see
136 では何の効果もないが、将来的には実装される可能性がある。
141 .\"O The user pages are a gift to the kernel.
142 .\"O The application may not modify this memory ever,
143 .\"O .\" FIXME Explain the following line in a little more detail:
144 .\"O or page cache and on-disk data may differ.
145 ユーザ・ページがカーネルへ渡すもの (gift) であることを示す。
146 アプリケーションはこのメモリを絶対に変更してはならない。
147 .\" FIXME Explain the following line in a little more detail:
148 さもなければ、ページキャッシュとディスク上のデータは
150 .\"O Gifting pages to the kernel means that a subsequent
152 .\"O .B SPLICE_F_MOVE
153 .\"O can successfully move the pages;
158 .\"O if this flag is not specified, then a subsequent
160 .\"O .B SPLICE_F_MOVE
161 .\"O must copy the pages.
162 このフラグが指定されなかった場合、この次の
165 でそのページのコピーを行わなければならない。
166 .\"O Data must also be properly page aligned, both in memory and length.
167 データはメモリ上でページ境界にあっていなければならず、
168 長さもページ境界の倍数でなければならない。
169 .\" .... if we expect to later SPLICE_F_MOVE to the cache.
170 .\"O .SH RETURN VALUE
172 .\"O Upon successful completion,
174 .\"O returns the number of bytes transferred to the pipe.
179 .\"O is set to indicate the error.
193 .\"O either not valid, or doesn't refer to a pipe.
195 が有効でない、もしくはパイプを参照していない。
199 .\"O is 0 or greater than
201 .\"O or memory not aligned if
202 .\"O .B SPLICE_F_GIFT
209 が設定されたがメモリがページ境界にあっていない。
218 .\"O system call first appeared in Linux 2.6.17.
220 システムコールは Linux 2.6.17 で初めて登場した。
221 .\"O .SH "CONFORMING TO"
223 .\"O This system call is Linux-specific.
224 このシステムコールは Linux 固有である。
228 .\"O follows the other vectorized read/write type functions when it comes to
229 .\"O limitations on number of segments being passed in.
233 .\"O .IR <limits.h> .
234 .\"O At the time of this writing, that limit is 1024.
235 指定されたセグメント数が上限に達した場合、
237 は他のベクトル形式の read/write を行う関数と同じ動作をする。
243 このドキュメントを書いた時点での値は 1024 である。