#include <asyncio.h>
Inheritance diagram for AsyncIO:

Definition at line 65 of file asyncio.h.
Public Member Functions | |
| AsyncIO (int fd, int sig=SIGIO) | |
| Constructor - perform I/O on file descriptor fd, using sig as completion signal. | |
| ~AsyncIO () | |
| Destructor - disconnect signal handler. | |
| int | read (volatile void *buf, vcl_size_t n) |
| Begin reading n bytes into buf starting at current file position. | |
| int | read (volatile void *buf, vcl_size_t n, off_t pos) |
| Begin reading n bytes into buf starting at absolute file position pos. | |
| int | write (volatile void *buf, vcl_size_t nbytes) |
| Begin writing n bytes from buf starting at current file position. | |
| int | write (volatile void *buf, vcl_size_t nbytes, off_t pos) |
| Begin writing n bytes from buf starting at absolute file position pos. | |
| int | wait_for_completion (bool suspend=true) |
| Wait for I/O to complete, then return status. | |
| bool | is_complete () |
Static Protected Member Functions | |
| static void | signal_handler (int) |
Static Protected Attributes | |
| static volatile vcl_sig_atomic_t | complete |
| Initialise shared state to "no operation in progress". | |
Private Attributes | |
| aiocb | cb |
| AsyncIO::AsyncIO | ( | int | fd, | |
| int | sig = SIGIO | |||
| ) |
Constructor - perform I/O on file descriptor fd, using sig as completion signal.
Note that SIGUSR1,2 may be used by the linuxthreads library.
Definition at line 23 of file asyncio.cxx.
| AsyncIO::~AsyncIO | ( | ) |
| int AsyncIO::read | ( | volatile void * | buf, | |
| vcl_size_t | n | |||
| ) |
Begin reading n bytes into buf starting at current file position.
Definition at line 43 of file asyncio.cxx.
| int AsyncIO::read | ( | volatile void * | buf, | |
| vcl_size_t | n, | |||
| off_t | pos | |||
| ) |
Begin reading n bytes into buf starting at absolute file position pos.
Definition at line 60 of file asyncio.cxx.
| int AsyncIO::write | ( | volatile void * | buf, | |
| vcl_size_t | nbytes | |||
| ) |
Begin writing n bytes from buf starting at current file position.
Definition at line 86 of file asyncio.cxx.
| int AsyncIO::write | ( | volatile void * | buf, | |
| vcl_size_t | nbytes, | |||
| off_t | pos | |||
| ) |
Begin writing n bytes from buf starting at absolute file position pos.
Definition at line 103 of file asyncio.cxx.
| int AsyncIO::wait_for_completion | ( | bool | suspend = true |
) |
Wait for I/O to complete, then return status.
If suspend is true (the default), block the calling process while waiting, otherwise continuously poll for completion (not recommended, but may be more reliable).
Definition at line 132 of file asyncio.cxx.
| void AsyncIO_Shared_State::signal_handler | ( | int | ) | [static, protected, inherited] |
Definition at line 15 of file asyncio.cxx.
struct aiocb AsyncIO::cb [private] |
volatile sig_atomic_t AsyncIO_Shared_State::complete [static, protected, inherited] |
1.5.1