mn_block_device.hpp
Go to the documentation of this file.
A buffer class that allocates a buffer of a given type and size.
Definition: mn_buffer.hpp:37
basic_block_device class is an interface for a block device.
Definition: mn_block_device.hpp:36
virtual ~basic_block_device()=default
BlockDevice's destructor.
virtual uint64_t get_size() const =0
basic_block_device(char prefix[8])
Definition: mn_block_device.hpp:38
virtual int read(uint64_t address, void *buffer, size_t size)=0
Reads data from a device.
virtual int synchronize()=0
Synchronizes state of a device, ensuring all cached writes are finished.
basic_block_device(const basic_block_device &)=delete
virtual size_t get_block_size() const =0
virtual void lock()=0
Locks the device for exclusive use by current thread.
basic_block_device & operator=(const basic_block_device &)=delete
virtual int erase(uint64_t address, uint64_t size)=0
Erases blocks on a device.
virtual int write(uint64_t address, const void *buffer, size_t size)=0
Writes data to a device.
virtual void unlock()=0
Unlocks the device which was previously locked by current thread.
Definition: mn_basic_device.hpp:27
This file is part of the Mini Thread Library (https://github.com/RoseLeBlood/MiniThread ).
Definition: mn_allocator_typetraits.hpp:25