1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright 2003 Abhijit Menon-Sen <ams@wiw.org>
.\" 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.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" 2005-04-08 mtk, noted kernel version and added BUGS
.\"
.\" Japanese Version Copyright (c) 2004-2007 Yuichi SATO
.\" all rights reserved.
.\" Translated Sun Jun 20 16:23:17 JST 2004
.\" by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v1.66
.\" Updated & Modified Fri Apr 22 03:05:51 JST 2005 by Yuichi SATO, LDP v2.02
.\" Updated & Modified Thu Jan 4 23:55:18 JST 2007 by Yuichi SATO, LDP v2.43
.\"
.TH POSIX_FADVISE 2 2003-02-14 "Linux" "Linux Programmer's Manual"
.SH ̾
posix_fadvise \- եǡΥѥ餫
.SH
.nf
.B #define _XOPEN_SOURCE 600
.B #include <fcntl.h>
.sp
.BI "int posix_fadvise(int " fd ", off_t " offset ", off_t " len ", int " advice ");"
.fi
.SH
ץϡΥѥǥեǡ
ջפ뤿
.BR posix_fadvise ()
ȤȤǤ롣
ˤꡢͥ뤬ŬڤʺŬ¹Ԥ뤳Ȥǽˤʤ롣
\fIadvice\fP \fIfd\fP ȤƤե
\fIoffset\fP Ϥޤ \fIlen\fP ХȤϰ
(\fIlen\fP 0 ξϥեνޤ)
(ɬ¸ߤʤ) ΰŬѤ롣
ɥХϵ̳ŤǤϤʤ
ɥХñ˥ץꥱΤ˲ǽǤ롣
\fIadvice\fP ˵ͤˤϡʲΤΤޤޤ:
.TP
.B POSIX_FADV_NORMAL
ꤵ줿ǡΥѥؼ륢ɥХ
ץꥱäƤʤȤ
ץ줿ե˥ɥХꤵʤ硢
줬ǥեȤDzꤵ롣
.TP
.B POSIX_FADV_SEQUENTIAL
ץꥱϻꤵ줿ǡ
(礭ʥեåȤ˾ʥեåȤΥǡɤ褦)
뤳ȤԤ롣
.TP
.B POSIX_FADV_RANDOM
ꤵ줿ǡʽ֤ǥ롣
.TP
.B POSIX_FADV_NOREUSE
ꤵ줿ǡ 1 ٤ʤ
.TP
.B POSIX_FADV_WILLNEED
ꤵ줿ǡ϶ᤤ襢롣
.TP
.B POSIX_FADV_DONTNEED
ꤵ줿ǡ϶ᤤ襢ʤ
.SH ֤
0 ֤롣
Ԥϥ顼ֹ椬֤롣
.SH 顼
.TP
.B EBADF
\fIfd\fP ͭʥեǥץǤʤ
.TP
.B EINVAL
̵ͤ \fIadvice\fP ˻ꤵ줿
.TP
.B ESPIPE
ꤵ줿եǥץѥפޤ FIFO ȤƤ
(ξ硢Linux ϼºݤˤ
.B EINVAL
֤)
.SH С
.BR posix_fadvise ()
ϥͥ 2.5.60 о줷
.\" ºݤˤ fadvise64() Ȥо줷-- MTK
glibc ǤΥݡȤ glibc С 2.2 ʹߤǹԤƤ롣
.SH
POSIX.1-2001.
.I len
η POSIX.1-2003 TC1 ˤ
.I size_t
.I off_t
ѹ줿դ뤳ȡ
.SH
Linux Ǥϡ\fBPOSIX_FADV_NORMAL\fP ϥХåǥХ
ǥեȥɤ (readahead) ɥꤹ롣
\fBPOSIX_FADV_SEQUENTIAL\fP ϤΥ 2 ܤ
\fBPOSIX_FADV_RANDOM\fP ɤߤ̵ˤ롣
ѹϥեΤ˱ƶꤵ줿ΰΤߤ˱ƶ櫓ǤϤʤ
(ƱեФ¾Υץեϥɥϱƶʤ)
\fBPOSIX_FADV_WILLNEED\fP ϡ
ڡå˻ΰΥ֥åʤɤ߹ߤϤ롣
ɤ߹ޤǡ̤ϡ
ۥ٤˰ͤäƥͥ뤬餹⤷ʤ
(ᥬХȤǤ̾ʬǤꡢ
¿ƤäΩʤ)
2.6.18 ΥͥǤϡ\fBPOSIX_FADV_NOREUSE\fP
\fBPOSIX_FADV_WILLNEED\fP Ʊ̣Ǥä
¿ʬХǤä
ͥ 2.6.18 ʹߤǤϡΥե饰ϲԤʤ
\fBPOSIX_FADV_DONTNEED\fP ϻꤵ줿ΰ˴Ϣդ줿
åڡ褦Ȥ롣
㤨С礭ʥեȥߥȤΩġ
ץϡѺѤߤΥå夵줿ǡ褦ˡ
Ū˥᤹ͥ뤫⤷ʤ
뤳Ȥˤꡢͭʥå夵줿ڡ
˴뤳ȤϤʤ
ޤФƤʤڡϱƶʤΤǡ
Υڡβݾڤ뤳Ȥץꥱ˾Ǥʤ顢
ǽ
.BR fsync (2)
ޤ
.BR fdatasync (2)
Ƥ֤٤Ǥ롣
.SH Х
2.6.6 ΥͥǤϡ
.I len
0 ꤵ줿硢
֥եνޤǤƤΥХȡפȤ̣ǤϤʤ
ʸ̤0 ХȡפȤƲᤵƤ
.SH Ϣ
.BR posix_madvise (2),
.BR readahead (2),
.BR posix_fallocate (3),
.BR feature_test_macros (7)
|