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.183 by root, Sun Sep 12 03:40:05 2010 UTC vs.
Revision 1.184 by root, Mon Nov 1 22:03:43 2010 UTC

168use common::sense; 168use common::sense;
169 169
170use base 'Exporter'; 170use base 'Exporter';
171 171
172BEGIN { 172BEGIN {
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
1581Returns the number of bytes copied, or C<-1> on error. 1583Returns 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
1585Simply calls the C<posix_fadvise> function (see it's 1587Simply calls the C<posix_fadvise> function (see its
1586manpage for details). The following advice constants are 1588manpage for details). The following advice constants are
1587avaiable: C<IO::AIO::FADV_NORMAL>, C<IO::AIO::FADV_SEQUENTIAL>, 1589avaiable: C<IO::AIO::FADV_NORMAL>, C<IO::AIO::FADV_SEQUENTIAL>,
1588C<IO::AIO::FADV_RANDOM>, C<IO::AIO::FADV_NOREUSE>, 1590C<IO::AIO::FADV_RANDOM>, C<IO::AIO::FADV_NOREUSE>,
1589C<IO::AIO::FADV_WILLNEED>, C<IO::AIO::FADV_DONTNEED>. 1591C<IO::AIO::FADV_WILLNEED>, C<IO::AIO::FADV_DONTNEED>.
1590 1592
1591On systems that do not implement C<posix_fadvise>, this function returns 1593On systems that do not implement C<posix_fadvise>, this function returns
1592ENOSYS, otherwise the return value of C<posix_fadvise>. 1594ENOSYS, otherwise the return value of C<posix_fadvise>.
1595
1596=item IO::AIO::madvise $scalar, $offset, $len, $advice
1597
1598Simply calls the C<posix_madvise> function (see its
1599manpage for details). The following advice constants are
1600avaiable: C<IO::AIO::MADV_NORMAL>, C<IO::AIO::MADV_SEQUENTIAL>,
1601C<IO::AIO::MADV_RANDOM>, C<IO::AIO::MADV_WILLNEED>, C<IO::AIO::MADV_DONTNEED>.
1602
1603On systems that do not implement C<posix_madvise>, this function returns
1604ENOSYS, otherwise the return value of C<posix_madvise>.
1605
1606=item IO::AIO::mprotect $scalar, $offset, $len, $protect
1607
1608Simply calls the C<mprotect> function on the preferably AIO::mmap'ed
1609$scalar (see its manpage for details). The following protect
1610constants are avaiable: C<IO::AIO::PROT_NONE>, C<IO::AIO::PROT_READ>,
1611C<IO::AIO::PROT_WRITE>, C<IO::AIO::PROT_EXEC>.
1612
1613On systems that do not implement C<mprotect>, this function returns
1614ENOSYS, 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
1596Memory-maps a file (or anonymous memory range) and attaches it to the 1618Memory-maps a file (or anonymous memory range) and attaches it to the
1597given C<$scalar>, which will act like a string scalar. 1619given C<$scalar>, which will act like a string scalar.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines