… | |
… | |
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 = '3.65'; |
173 | our $VERSION = '3.7'; |
174 | |
174 | |
175 | our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close |
175 | our @AIO_REQ = qw(aio_sendfile 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_sync aio_fsync |
177 | aio_scandir aio_symlink aio_readlink aio_sync aio_fsync |
178 | aio_fdatasync aio_sync_file_range aio_pathsync aio_readahead |
178 | aio_fdatasync aio_sync_file_range aio_pathsync aio_readahead |
… | |
… | |
265 | IO::AIO::nready |
265 | IO::AIO::nready |
266 | IO::AIO::npending |
266 | IO::AIO::npending |
267 | |
267 | |
268 | IO::AIO::sendfile $ofh, $ifh, $offset, $count |
268 | IO::AIO::sendfile $ofh, $ifh, $offset, $count |
269 | IO::AIO::fadvise $fh, $offset, $len, $advice |
269 | IO::AIO::fadvise $fh, $offset, $len, $advice |
|
|
270 | IO::AIO::madvise $scalar, $offset, $length, $advice |
|
|
271 | IO::AIO::mprotect $scalar, $offset, $length, $protect |
270 | IO::AIO::munlock $scalar, $offset = 0, $length = undef |
272 | IO::AIO::munlock $scalar, $offset = 0, $length = undef |
271 | IO::AIO::munlockall |
273 | IO::AIO::munlockall |
272 | |
274 | |
273 | =head2 AIO REQUEST FUNCTIONS |
275 | =head2 AIO REQUEST FUNCTIONS |
274 | |
276 | |
… | |
… | |
1580 | |
1582 | |
1581 | Returns the number of bytes copied, or C<-1> on error. |
1583 | Returns the number of bytes copied, or C<-1> on error. |
1582 | |
1584 | |
1583 | =item IO::AIO::fadvise $fh, $offset, $len, $advice |
1585 | =item IO::AIO::fadvise $fh, $offset, $len, $advice |
1584 | |
1586 | |
1585 | Simply calls the C<posix_fadvise> function (see it's |
1587 | Simply calls the C<posix_fadvise> function (see its |
1586 | manpage for details). The following advice constants are |
1588 | manpage for details). The following advice constants are |
1587 | avaiable: C<IO::AIO::FADV_NORMAL>, C<IO::AIO::FADV_SEQUENTIAL>, |
1589 | avaiable: C<IO::AIO::FADV_NORMAL>, C<IO::AIO::FADV_SEQUENTIAL>, |
1588 | C<IO::AIO::FADV_RANDOM>, C<IO::AIO::FADV_NOREUSE>, |
1590 | C<IO::AIO::FADV_RANDOM>, C<IO::AIO::FADV_NOREUSE>, |
1589 | C<IO::AIO::FADV_WILLNEED>, C<IO::AIO::FADV_DONTNEED>. |
1591 | C<IO::AIO::FADV_WILLNEED>, C<IO::AIO::FADV_DONTNEED>. |
1590 | |
1592 | |
1591 | On systems that do not implement C<posix_fadvise>, this function returns |
1593 | On systems that do not implement C<posix_fadvise>, this function returns |
1592 | ENOSYS, otherwise the return value of C<posix_fadvise>. |
1594 | ENOSYS, otherwise the return value of C<posix_fadvise>. |
|
|
1595 | |
|
|
1596 | =item IO::AIO::madvise $scalar, $offset, $len, $advice |
|
|
1597 | |
|
|
1598 | Simply calls the C<posix_madvise> function (see its |
|
|
1599 | manpage for details). The following advice constants are |
|
|
1600 | avaiable: C<IO::AIO::MADV_NORMAL>, C<IO::AIO::MADV_SEQUENTIAL>, |
|
|
1601 | C<IO::AIO::MADV_RANDOM>, C<IO::AIO::MADV_WILLNEED>, C<IO::AIO::MADV_DONTNEED>. |
|
|
1602 | |
|
|
1603 | On systems that do not implement C<posix_madvise>, this function returns |
|
|
1604 | ENOSYS, otherwise the return value of C<posix_madvise>. |
|
|
1605 | |
|
|
1606 | =item IO::AIO::mprotect $scalar, $offset, $len, $protect |
|
|
1607 | |
|
|
1608 | Simply calls the C<mprotect> function on the preferably AIO::mmap'ed |
|
|
1609 | $scalar (see its manpage for details). The following protect |
|
|
1610 | constants are avaiable: C<IO::AIO::PROT_NONE>, C<IO::AIO::PROT_READ>, |
|
|
1611 | C<IO::AIO::PROT_WRITE>, C<IO::AIO::PROT_EXEC>. |
|
|
1612 | |
|
|
1613 | On systems that do not implement C<mprotect>, this function returns |
|
|
1614 | ENOSYS, otherwise the return value of C<mprotect>. |
1593 | |
1615 | |
1594 | =item IO::AIO::mmap $scalar, $length, $prot, $flags, $fh[, $offset] |
1616 | =item IO::AIO::mmap $scalar, $length, $prot, $flags, $fh[, $offset] |
1595 | |
1617 | |
1596 | Memory-maps a file (or anonymous memory range) and attaches it to the |
1618 | Memory-maps a file (or anonymous memory range) and attaches it to the |
1597 | given C<$scalar>, which will act like a string scalar. |
1619 | given C<$scalar>, which will act like a string scalar. |