ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/eio.pod
(Generate patch)

Comparing libeio/eio.pod (file contents):
Revision 1.8 by root, Sun Jun 5 22:45:49 2011 UTC vs.
Revision 1.9 by root, Sun Jun 5 23:07:46 2011 UTC

488 488
489These requests are specific to libeio and do not correspond to any OS call. 489These requests are specific to libeio and do not correspond to any OS call.
490 490
491=over 4 491=over 4
492 492
493=item eio_mtouch (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data) 493=item eio_mtouch (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data)
494 494
495Reads (C<flags == 0>) or modifies (C<flags == EIO_MT_MODIFY) the given
496memory area, page-wise, that is, it reads (or reads and writes back) the
497first octet of every page that spans the memory area.
498
499This can be used to page in some mmapped file, or dirty some pages. Note
500that dirtying is an unlocked read-write access, so races can ensue when
501the some other thread modifies the data stored in that memory area.
502
495=item eio_custom (void (*)(eio_req *) execute, int pri, eio_cb cb, void *data) 503=item eio_custom (void (*)(eio_req *) execute, int pri, eio_cb cb, void *data)
496 504
497Executes a custom request, i.e., a user-specified callback. 505Executes a custom request, i.e., a user-specified callback.
498 506
499The callback gets the C<eio_req *> as parameter and is expected to read 507The callback gets the C<eio_req *> as parameter and is expected to read
500and modify any request-specific members. Specifically, it should set C<< 508and modify any request-specific members. Specifically, it should set C<<
520 req->result = open (req->data, O_RDONLY); 528 req->result = open (req->data, O_RDONLY);
521 } 529 }
522 530
523 eio_custom (my_open, 0, my_open_done, "/etc/passwd"); 531 eio_custom (my_open, 0, my_open_done, "/etc/passwd");
524 532
525=item eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data) 533=item eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data)
526 534
527This is a a request that takes C<delay> seconds to execute, but otherwise 535This is a a request that takes C<delay> seconds to execute, but otherwise
528does nothing - it simply puts one of the worker threads to sleep for this 536does nothing - it simply puts one of the worker threads to sleep for this
529long. 537long.
530 538
531This request can be used to artificially increase load, e.g. for debugging 539This request can be used to artificially increase load, e.g. for debugging
532or benchmarking reasons. 540or benchmarking reasons.
533 541
534=item eio_nop (int pri, eio_cb cb, void *data) 542=item eio_nop (int pri, eio_cb cb, void *data)
535 543
536This request does nothing, except go through the whole request cycle. This 544This request does nothing, except go through the whole request cycle. This
537can be used to measure latency or in some cases to simplify code, but is 545can be used to measure latency or in some cases to simplify code, but is
538not really of much use. 546not really of much use.
539 547

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines