ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.pm
(Generate patch)

Comparing IO-AIO/AIO.pm (file contents):
Revision 1.225 by root, Tue Apr 10 05:01:33 2012 UTC vs.
Revision 1.229 by root, Wed Jul 25 16:32:30 2012 UTC

221 aio_statvfs $fh_or_path, $callback->($statvfs) 221 aio_statvfs $fh_or_path, $callback->($statvfs)
222 aio_utime $fh_or_path, $atime, $mtime, $callback->($status) 222 aio_utime $fh_or_path, $atime, $mtime, $callback->($status)
223 aio_chown $fh_or_path, $uid, $gid, $callback->($status) 223 aio_chown $fh_or_path, $uid, $gid, $callback->($status)
224 aio_chmod $fh_or_path, $mode, $callback->($status) 224 aio_chmod $fh_or_path, $mode, $callback->($status)
225 aio_truncate $fh_or_path, $offset, $callback->($status) 225 aio_truncate $fh_or_path, $offset, $callback->($status)
226 aio_allocate $fh, $mode, $offset, $len, $callback->($status)
226 aio_unlink $pathname, $callback->($status) 227 aio_unlink $pathname, $callback->($status)
227 aio_mknod $pathname, $mode, $dev, $callback->($status) 228 aio_mknod $pathname, $mode, $dev, $callback->($status)
228 aio_link $srcpath, $dstpath, $callback->($status) 229 aio_link $srcpath, $dstpath, $callback->($status)
229 aio_symlink $srcpath, $dstpath, $callback->($status) 230 aio_symlink $srcpath, $dstpath, $callback->($status)
230 aio_readlink $pathname, $callback->($link) 231 aio_readlink $pathname, $callback->($link)
272 IO::AIO::nready 273 IO::AIO::nready
273 IO::AIO::npending 274 IO::AIO::npending
274 275
275 IO::AIO::sendfile $ofh, $ifh, $offset, $count 276 IO::AIO::sendfile $ofh, $ifh, $offset, $count
276 IO::AIO::fadvise $fh, $offset, $len, $advice 277 IO::AIO::fadvise $fh, $offset, $len, $advice
278 IO::AIO::mmap $scalar, $length, $prot, $flags[, $fh[, $offset]]
279 IO::AIO::munmap $scalar
277 IO::AIO::madvise $scalar, $offset, $length, $advice 280 IO::AIO::madvise $scalar, $offset, $length, $advice
278 IO::AIO::mprotect $scalar, $offset, $length, $protect 281 IO::AIO::mprotect $scalar, $offset, $length, $protect
279 IO::AIO::munlock $scalar, $offset = 0, $length = undef 282 IO::AIO::munlock $scalar, $offset = 0, $length = undef
280 IO::AIO::munlockall 283 IO::AIO::munlockall
281 284
634 637
635 638
636=item aio_truncate $fh_or_path, $offset, $callback->($status) 639=item aio_truncate $fh_or_path, $offset, $callback->($status)
637 640
638Works like truncate(2) or ftruncate(2). 641Works like truncate(2) or ftruncate(2).
642
643
644=item aio_allocate $fh, $mode, $offset, $len, $callback->($status)
645
646Allocates or freed disk space according to the C<$mode> argument. See the
647linux C<fallocate> docuemntation for details.
648
649C<$mode> can currently be C<0> or C<IO::AIO::FALLOC_FL_KEEP_SIZE>
650to allocate space, or C<IO::AIO::FALLOC_FL_PUNCH_HOLE |
651IO::AIO::FALLOC_FL_KEEP_SIZE>, to deallocate a file range.
652
653The file system block size used by C<fallocate> is presumably the
654C<f_bsize> returned by C<statvfs>.
655
656If C<fallocate> isn't available or cannot be emulated (currently no
657emulation will be attempted), passes C<-1> and sets C<$!> to C<ENOSYS>.
639 658
640 659
641=item aio_chmod $fh_or_path, $mode, $callback->($status) 660=item aio_chmod $fh_or_path, $mode, $callback->($status)
642 661
643Works like perl's C<chmod> function. 662Works like perl's C<chmod> function.
1906ENOSYS, otherwise the return value of C<mprotect>. 1925ENOSYS, otherwise the return value of C<mprotect>.
1907 1926
1908=item IO::AIO::mmap $scalar, $length, $prot, $flags, $fh[, $offset] 1927=item IO::AIO::mmap $scalar, $length, $prot, $flags, $fh[, $offset]
1909 1928
1910Memory-maps a file (or anonymous memory range) and attaches it to the 1929Memory-maps a file (or anonymous memory range) and attaches it to the
1911given C<$scalar>, which will act like a string scalar. 1930given C<$scalar>, which will act like a string scalar. Returns true on
1931success, and false otherwise.
1912 1932
1913The only operations allowed on the scalar are C<substr>/C<vec> that don't 1933The only operations allowed on the scalar are C<substr>/C<vec> that don't
1914change the string length, and most read-only operations such as copying it 1934change the string length, and most read-only operations such as copying it
1915or searching it with regexes and so on. 1935or searching it with regexes and so on.
1916 1936
1975 1995
1976Calls the GNU/Linux C<splice(2)> syscall, if available. If C<$r_off> or 1996Calls the GNU/Linux C<splice(2)> syscall, if available. If C<$r_off> or
1977C<$w_off> are C<undef>, then C<NULL> is passed for these, otherwise they 1997C<$w_off> are C<undef>, then C<NULL> is passed for these, otherwise they
1978should be the file offset. 1998should be the file offset.
1979 1999
2000C<$r_fh> and C<$w_fh> should not refer to the same file, as splice might
2001silently corrupt the data in this case.
2002
1980The following symbol flag values are available: C<IO::AIO::SPLICE_F_MOVE>, 2003The following symbol flag values are available: C<IO::AIO::SPLICE_F_MOVE>,
1981C<IO::AIO::SPLICE_F_NONBLOCK>, C<IO::AIO::SPLICE_F_MORE> and 2004C<IO::AIO::SPLICE_F_NONBLOCK>, C<IO::AIO::SPLICE_F_MORE> and
1982C<IO::AIO::SPLICE_F_GIFT>. 2005C<IO::AIO::SPLICE_F_GIFT>.
1983 2006
1984See the C<splice(2)> manpage for details. 2007See the C<splice(2)> manpage for details.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines