… | |
… | |
168 | use common::sense; |
168 | use common::sense; |
169 | |
169 | |
170 | use base 'Exporter'; |
170 | use base 'Exporter'; |
171 | |
171 | |
172 | BEGIN { |
172 | BEGIN { |
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 | |
426 | In theory, the C<$whence> constants could be different than the |
426 | In theory, the C<$whence> constants could be different than the |
427 | corresponding values from L<Fcntl>, but perl guarantees they are the same, |
427 | corresponding values from L<Fcntl>, but perl guarantees they are the same, |
428 | so don't panic. |
428 | so don't panic. |
429 | |
429 | |
|
|
430 | As a GNU/Linux (and maybe Solaris) extension, also the constants |
|
|
431 | C<IO::AIO::SEEK_DATA> and C<IO::AIO::SEEK_HOLE> are available, if they |
|
|
432 | could be found. No guarantees about suitability for use in C<aio_seek> or |
|
|
433 | Perl'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 | |
434 | Reads or writes C<$length> bytes from or to the specified C<$fh> and |
440 | Reads or writes C<$length> bytes from or to the specified C<$fh> and |
… | |
… | |
1963 | Calls the C<munlockall> function. |
1969 | Calls the C<munlockall> function. |
1964 | |
1970 | |
1965 | On systems that do not implement C<munlockall>, this function returns |
1971 | On systems that do not implement C<munlockall>, this function returns |
1966 | ENOSYS, otherwise the return value of C<munlockall>. |
1972 | ENOSYS, 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 | |
|
|
1976 | Calls the GNU/Linux C<splice(2)> syscall, if available. If C<$r_off> or |
|
|
1977 | C<$w_off> are C<undef>, then C<NULL> is passed for these, otherwise they |
|
|
1978 | should be the file offset. |
|
|
1979 | |
|
|
1980 | The following symbol flag values are available: C<IO::AIO::SPLICE_F_MOVE>, |
|
|
1981 | C<IO::AIO::SPLICE_F_NONBLOCK>, C<IO::AIO::SPLICE_F_MORE> and |
|
|
1982 | C<IO::AIO::SPLICE_F_GIFT>. |
|
|
1983 | |
|
|
1984 | See the C<splice(2)> manpage for details. |
|
|
1985 | |
|
|
1986 | =item IO::AIO::tee $r_fh, $w_fh, $length, $flags |
|
|
1987 | |
|
|
1988 | Calls the GNU/Linux C<tee(2)> syscall, see it's manpage and the |
|
|
1989 | description for C<IO::AIO::splice> above for details. |
|
|
1990 | |
1968 | =back |
1991 | =back |
1969 | |
1992 | |
1970 | =cut |
1993 | =cut |
1971 | |
1994 | |
1972 | min_parallel 8; |
1995 | min_parallel 8; |