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.223 by root, Fri Apr 6 22:51:02 2012 UTC vs.
Revision 1.226 by root, Mon May 28 17:00:19 2012 UTC

168use common::sense; 168use common::sense;
169 169
170use base 'Exporter'; 170use base 'Exporter';
171 171
172BEGIN { 172BEGIN {
173 our $VERSION = '4.13'; 173 our $VERSION = '4.15';
174 174
175 our @AIO_REQ = qw(aio_sendfile aio_seek aio_read aio_write aio_open aio_close 175 our @AIO_REQ = qw(aio_sendfile aio_seek aio_read aio_write aio_open aio_close
176 aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx 176 aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx
177 aio_scandir aio_symlink aio_readlink aio_realpath aio_sync 177 aio_scandir aio_symlink aio_readlink aio_realpath aio_sync
178 aio_fsync aio_syncfs aio_fdatasync aio_sync_file_range aio_fallocate 178 aio_fsync aio_syncfs aio_fdatasync aio_sync_file_range aio_fallocate
272 IO::AIO::nready 272 IO::AIO::nready
273 IO::AIO::npending 273 IO::AIO::npending
274 274
275 IO::AIO::sendfile $ofh, $ifh, $offset, $count 275 IO::AIO::sendfile $ofh, $ifh, $offset, $count
276 IO::AIO::fadvise $fh, $offset, $len, $advice 276 IO::AIO::fadvise $fh, $offset, $len, $advice
277 IO::AIO::mmap $scalar, $length, $prot, $flags[, $fh[, $offset]]
278 IO::AIO::munmap $scalar
277 IO::AIO::madvise $scalar, $offset, $length, $advice 279 IO::AIO::madvise $scalar, $offset, $length, $advice
278 IO::AIO::mprotect $scalar, $offset, $length, $protect 280 IO::AIO::mprotect $scalar, $offset, $length, $protect
279 IO::AIO::munlock $scalar, $offset = 0, $length = undef 281 IO::AIO::munlock $scalar, $offset = 0, $length = undef
280 IO::AIO::munlockall 282 IO::AIO::munlockall
281 283
424case of an error. 426case of an error.
425 427
426In theory, the C<$whence> constants could be different than the 428In theory, the C<$whence> constants could be different than the
427corresponding values from L<Fcntl>, but perl guarantees they are the same, 429corresponding values from L<Fcntl>, but perl guarantees they are the same,
428so don't panic. 430so don't panic.
431
432As a GNU/Linux (and maybe Solaris) extension, also the constants
433C<IO::AIO::SEEK_DATA> and C<IO::AIO::SEEK_HOLE> are available, if they
434could be found. No guarantees about suitability for use in C<aio_seek> or
435Perl's C<sysseek> can be made though, although I would naively assume they
436"just work".
429 437
430=item aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval) 438=item aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval)
431 439
432=item aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval) 440=item aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval)
433 441
1963Calls the C<munlockall> function. 1971Calls the C<munlockall> function.
1964 1972
1965On systems that do not implement C<munlockall>, this function returns 1973On systems that do not implement C<munlockall>, this function returns
1966ENOSYS, otherwise the return value of C<munlockall>. 1974ENOSYS, otherwise the return value of C<munlockall>.
1967 1975
1976=item IO::AIO::splice $r_fh, $r_off, $w_fh, $w_off, $length, $flags
1977
1978Calls the GNU/Linux C<splice(2)> syscall, if available. If C<$r_off> or
1979C<$w_off> are C<undef>, then C<NULL> is passed for these, otherwise they
1980should be the file offset.
1981
1982The following symbol flag values are available: C<IO::AIO::SPLICE_F_MOVE>,
1983C<IO::AIO::SPLICE_F_NONBLOCK>, C<IO::AIO::SPLICE_F_MORE> and
1984C<IO::AIO::SPLICE_F_GIFT>.
1985
1986See the C<splice(2)> manpage for details.
1987
1988=item IO::AIO::tee $r_fh, $w_fh, $length, $flags
1989
1990Calls the GNU/Linux C<tee(2)> syscall, see it's manpage and the
1991description for C<IO::AIO::splice> above for details.
1992
1968=back 1993=back
1969 1994
1970=cut 1995=cut
1971 1996
1972min_parallel 8; 1997min_parallel 8;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines