LLFIO  v2.00
llfio_v2_xxx::byte_io_multiplexer::_unsynchronised_io_operation_state Struct Reference

An unsynchronised i/o operation state. More...

#include "byte_io_multiplexer.hpp"

Inheritance diagram for llfio_v2_xxx::byte_io_multiplexer::_unsynchronised_io_operation_state:
llfio_v2_xxx::byte_io_multiplexer::io_operation_state llfio_v2_xxx::byte_io_multiplexer::_synchronised_io_operation_state

Classes

union  payload_t
 Variant storage. More...
 

Public Member Functions

constexpr _unsynchronised_io_operation_state ()
 Construct an unknown state.
 
 _unsynchronised_io_operation_state (byte_io_handle *_h, io_operation_state_visitor *_v, registered_buffer_type &&b, deadline d, io_request< buffers_type > reqs)
 Construct a read operation state.
 
 _unsynchronised_io_operation_state (byte_io_handle *_h, io_operation_state_visitor *_v, registered_buffer_type &&b, deadline d, io_request< const_buffers_type > reqs)
 Construct a write operation state.
 
 _unsynchronised_io_operation_state (byte_io_handle *_h, io_operation_state_visitor *_v, registered_buffer_type &&b, deadline d, io_request< const_buffers_type > reqs, barrier_kind kind)
 Construct a barrier operation state.
 
 _unsynchronised_io_operation_state (io_result< buffers_type > &&res)
 Construct a finished read operation state.
 
 _unsynchronised_io_operation_state (io_result< const_buffers_type > &&res)
 Construct a finished write or barrier operation state.
 
 _unsynchronised_io_operation_state (const _unsynchronised_io_operation_state &)=delete
 
_unsynchronised_io_operation_stateoperator= (const _unsynchronised_io_operation_state &)=delete
 
_unsynchronised_io_operation_stateoperator= (_unsynchronised_io_operation_state &&)=delete
 
void clear_storage ()
 Used to clear the storage in this operation state.
 
virtual void * invoke (function_ptr< void *(io_operation_state_type)> c) const noexcept override
 Invoke the callable with the per-i/o state lock held, if any.
 
virtual io_operation_state_type current_state () const noexcept override
 Used to retrieve the current state of the i/o operation.
 
virtual io_result< buffers_typeget_completed_read () &&noexcept override
 After an i/o operation has finished, can be used to retrieve the result if the visitor did not.
 
virtual io_result< const_buffers_typeget_completed_write_or_barrier () &&noexcept override
 After an i/o operation has finished, can be used to retrieve the result if the visitor did not.
 
virtual io_operation_staterelocate_to (byte *to_) noexcept override
 Relocate the state to new storage, clearing the original state. Terminates the process if the state is in use.
 
void _read_initiated (lock_guard &g)
 
void _read_completed (lock_guard &g, io_result< buffers_type > &&res)
 
void _read_finished (lock_guard &g)
 
void _write_initiated (lock_guard &g)
 
void _write_completed (lock_guard &g, io_result< const_buffers_type > &&res)
 
void _barrier_initiated (lock_guard &g)
 
void _barrier_completed (lock_guard &g, io_result< const_buffers_type > &&res)
 
void _write_or_barrier_finished (lock_guard &g)
 
virtual void read_initiated ()
 
virtual void read_completed (io_result< buffers_type > &&res)
 
virtual void read_finished ()
 
virtual void write_initiated ()
 
virtual void write_completed (io_result< const_buffers_type > &&res)
 
virtual void barrier_initiated ()
 
virtual void barrier_completed (io_result< const_buffers_type > &&res)
 
virtual void write_or_barrier_finished ()
 

Public Attributes

io_operation_state_type state {io_operation_state_type::unknown}
 The current lifecycle state of this i/o operation.
 
union llfio_v2_xxx::byte_io_multiplexer::_unsynchronised_io_operation_state::payload_t payload
 
byte_io_handleh {nullptr}
 The i/o handle the i/o operation is upon.
 
io_operation_state_visitorvisitor {nullptr}
 The state visitor supplied when the operation was initialised.
 

Protected Member Functions

 _unsynchronised_io_operation_state (_unsynchronised_io_operation_state &&o) noexcept
 
virtual void _lock () noexcept
 
virtual void _unlock () noexcept
 

Detailed Description

An unsynchronised i/o operation state.

This implementation does NOT use atomics during access.


The documentation for this struct was generated from the following file: