… | |
… | |
324 | |
324 | |
325 | =item aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
325 | =item aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
326 | |
326 | |
327 | =item aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
327 | =item aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
328 | |
328 | |
329 | Reads or writes C<length> bytes from the specified C<fh> and C<offset> |
329 | Reads or writes C<$length> bytes from the specified C<$fh> and C<$offset> |
330 | into the scalar given by C<data> and offset C<dataoffset> and calls the |
330 | into the scalar given by C<$data> and offset C<$dataoffset> and calls the |
331 | callback without the actual number of bytes read (or -1 on error, just |
331 | callback without the actual number of bytes read (or -1 on error, just |
332 | like the syscall). If C<offset> is undefined, then the current file offset |
332 | like the syscall). |
|
|
333 | |
|
|
334 | If C<$offset> is undefined, then the current file offset will be used (and |
333 | will be used (and updated), otherwise the file offset will not be changed |
335 | updated), otherwise the file offset will not be changed by these calls. |
334 | by these calls. |
336 | |
|
|
337 | If C<$length> is undefined in C<aio_write>, use the remaining length of C<$data>. |
|
|
338 | |
|
|
339 | If C<$dataoffset> is less than zero, it will be counted from the end of |
|
|
340 | C<$data>. |
335 | |
341 | |
336 | The C<$data> scalar I<MUST NOT> be modified in any way while the request |
342 | The C<$data> scalar I<MUST NOT> be modified in any way while the request |
337 | is outstanding. Modifying it can result in segfaults or World War III (if |
343 | is outstanding. Modifying it can result in segfaults or World War III (if |
338 | the necessary/optional hardware is installed). |
344 | the necessary/optional hardware is installed). |
339 | |
345 | |