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.224 by root, Sat Apr 7 00:50:33 2012 UTC vs.
Revision 1.225 by root, Tue Apr 10 05:01:33 2012 UTC

168use common::sense; 168use common::sense;
169 169
170use base 'Exporter'; 170use base 'Exporter';
171 171
172BEGIN { 172BEGIN {
173 our $VERSION = '4.14'; 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
425 425
426In theory, the C<$whence> constants could be different than the 426In theory, the C<$whence> constants could be different than the
427corresponding values from L<Fcntl>, but perl guarantees they are the same, 427corresponding values from L<Fcntl>, but perl guarantees they are the same,
428so don't panic. 428so don't panic.
429 429
430As a GNU/Linux (and maybe Solaris) extension, also the constants
431C<IO::AIO::SEEK_DATA> and C<IO::AIO::SEEK_HOLE> are available, if they
432could be found. No guarantees about suitability for use in C<aio_seek> or
433Perl's C<sysseek> can be made though, although I would naively assume they
434"just work".
435
430=item aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval) 436=item aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval)
431 437
432=item aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval) 438=item aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval)
433 439
434Reads or writes C<$length> bytes from or to the specified C<$fh> and 440Reads or writes C<$length> bytes from or to the specified C<$fh> and
1963Calls the C<munlockall> function. 1969Calls the C<munlockall> function.
1964 1970
1965On systems that do not implement C<munlockall>, this function returns 1971On systems that do not implement C<munlockall>, this function returns
1966ENOSYS, otherwise the return value of C<munlockall>. 1972ENOSYS, otherwise the return value of C<munlockall>.
1967 1973
1974=item IO::AIO::splice $r_fh, $r_off, $w_fh, $w_off, $length, $flags
1975
1976Calls 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
1978should be the file offset.
1979
1980The 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
1982C<IO::AIO::SPLICE_F_GIFT>.
1983
1984See the C<splice(2)> manpage for details.
1985
1986=item IO::AIO::tee $r_fh, $w_fh, $length, $flags
1987
1988Calls the GNU/Linux C<tee(2)> syscall, see it's manpage and the
1989description for C<IO::AIO::splice> above for details.
1990
1968=back 1991=back
1969 1992
1970=cut 1993=cut
1971 1994
1972min_parallel 8; 1995min_parallel 8;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines