--- IO-AIO/README 2009/11/12 00:01:52 1.40 +++ IO-AIO/README 2010/01/02 14:24:32 1.41 @@ -317,9 +317,10 @@ provide zero-copy operation. For this to work, $out_fh should refer to a socket, and $in_fh should refer to mmap'able file. - If the native sendfile call fails or is not implemented, it will be - emulated, so you can call "aio_sendfile" on any type of filehandle - regardless of the limitations of the operating system. + If a native sendfile cannot be found or it fails with "ENOSYS", + "ENOTSUP", "EOPNOTSUPP", "EAFNOSUPPORT", "EPROTOTYPE" or "ENOTSOCK", + it will be emulated, so you can call "aio_sendfile" on any type of + filehandle regardless of the limitations of the operating system. Please note, however, that "aio_sendfile" can read more bytes from $in_fh than are written, and there is no way to find out how many @@ -638,6 +639,32 @@ Passes 0 when everything went ok, and -1 on error. + aio_msync $scalar, $offset = 0, $length = undef, flags = 0, + $callback->($status) + This is a rather advanced IO::AIO call, which only works on + mmap(2)ed scalars (see the Sys::Mmap or Mmap modules for details on + this, note that the scalar must only be modified in-place while an + aio operation is pending on it). + + It calls the "msync" function of your OS, if available, with the + memory area starting at $offset in the string and ending $length + bytes later. If $length is negative, counts from the end, and if + $length is "undef", then it goes till the end of the string. The + flags can be a combination of "IO::AIO::MS_ASYNC", + "IO::AIO::MS_INVALIDATE" and "IO::AIO::MS_SYNC". + + aio_mtouch $scalar, $offset = 0, $length = undef, flags = 0, + $callback->($status) + This is a rather advanced IO::AIO call, which works best on + mmap(2)ed scalars. + + It touches (reads or writes) all memory pages in the specified range + inside the scalar. All caveats and parameters are the same as for + "aio_msync", above, except for flags, which must be either 0 (which + reads all pages and ensures they are instantiated) or + "IO::AIO::MT_MODIFY", which modifies the memory page s(by reading + and writing an octet from it, which dirties the page). + aio_group $callback->(...) This is a very special aio request: Instead of doing something, it is a container for other aio requests, which is useful if you want @@ -763,6 +790,9 @@ request itself. Useful when you queued a lot of events but got a result early. + The group request will finish normally (you cannot add requests to + the group). + $grp->result (...) Set the result value(s) that will be passed to the group callback when all subrequests have finished and set the groups errno to the