14 #ifndef FOXXLL_IO_LINUXAIO_REQUEST_HEADER 15 #define FOXXLL_IO_LINUXAIO_REQUEST_HEADER 19 #if FOXXLL_HAVE_LINUXAIO_FILE 21 #include <linux/aio_abi.h> 36 class linuxaio_request :
public request_with_state
38 constexpr
static bool debug =
false;
40 template <
class base_file_type>
41 friend class fileperblock_file;
50 file* file,
void* buffer, offset_type offset, size_type
bytes,
51 const read_or_write& op)
52 : request_with_state(on_complete, file, buffer, offset, bytes, op)
54 assert(dynamic_cast<linuxaio_file*>(file));
55 TLX_LOG <<
"linuxaio_request[" <<
this <<
"]" 56 <<
" linuxaio_request" 57 <<
"(file=" << file <<
" buffer=" << buffer
58 <<
" offset=" << offset <<
" bytes=" << bytes
59 <<
" op=" << op <<
")";
62 iocb * fill_control_block();
64 bool cancel_aio(linuxaio_queue* queue);
65 void completed(
bool posted,
bool canceled);
66 void completed(
bool canceled) { completed(
true, canceled); }
73 #endif // #if FOXXLL_HAVE_LINUXAIO_FILE 75 #endif // !FOXXLL_IO_LINUXAIO_REQUEST_HEADER
tlx::delegate< void(request *r, bool success)> completion_handler
completion handler
static constexpr bool debug
static const size_t bytes
number of bytes in uint_pair
#define TLX_LOG
Default logging method: output if the local debug variable is true.