EXTENSION: RAII holder a locked extent of bytes in a file.
More...
#include "lockable_byte_io_handle.hpp"
|
class | lockable_byte_io_handle |
|
EXTENSION: RAII holder a locked extent of bytes in a file.
◆ extent_guard() [1/3]
constexpr llfio_v2_xxx::lockable_byte_io_handle::extent_guard::extent_guard |
( |
lockable_byte_io_handle * |
h, |
|
|
extent_type |
offset, |
|
|
extent_type |
length, |
|
|
lock_kind |
kind |
|
) |
| |
|
inlineconstexprprotected |
157 : _h(h)
158 , _offset(offset)
160 , _kind(kind)
161 {
162 }
result< section_handle::extent_type > length(const section_handle &self) noexcept
Return the current maximum permitted extent of the memory section.
Definition map_handle.hpp:1071
◆ extent_guard() [2/3]
constexpr llfio_v2_xxx::lockable_byte_io_handle::extent_guard::extent_guard |
( |
| ) |
|
|
inlineconstexpr |
◆ extent_guard() [3/3]
llfio_v2_xxx::lockable_byte_io_handle::extent_guard::extent_guard |
( |
extent_guard && |
o | ) |
|
|
inlinenoexcept |
Move constructor.
172 : _h(o._h)
173 , _offset(o._offset)
174 , _length(o._length)
175 , _kind(o._kind)
176 {
177 o.release();
178 }
◆ ~extent_guard()
llfio_v2_xxx::lockable_byte_io_handle::extent_guard::~extent_guard |
( |
| ) |
|
|
inline |
195 {
196 if(_h != nullptr)
197 {
199 }
200 }
void unlock() noexcept
Unlocks the locked extent immediately.
Definition lockable_byte_io_handle.hpp:212
◆ extent()
std::tuple< extent_type, extent_type, lock_kind > llfio_v2_xxx::lockable_byte_io_handle::extent_guard::extent |
( |
| ) |
const |
|
inlinenoexcept |
The extent to be unlocked.
209{ return std::make_tuple(_offset, _length, _kind); }
◆ handle()
The lockable_byte_io_handle
to be unlocked.
◆ operator bool()
llfio_v2_xxx::lockable_byte_io_handle::extent_guard::operator bool |
( |
| ) |
const |
|
inlineexplicitnoexcept |
True if extent guard is valid.
202{ return _h != nullptr; }
◆ operator=()
Move assign.
181 {
182 if(this == &o)
183 {
184 return *this;
185 }
187 _h = o._h;
188 _offset = o._offset;
189 _length = o._length;
190 _kind = o._kind;
191 o.release();
192 return *this;
193 }
◆ release()
void llfio_v2_xxx::lockable_byte_io_handle::extent_guard::release |
( |
| ) |
|
|
inlinenoexcept |
Detach this RAII unlocker from the locked state.
223 {
224 _h = nullptr;
225 _offset = 0;
226 _length = 0;
228 }
◆ set_handle()
Sets the lockable_byte_io_handle
to be unlocked.
◆ unlock()
void llfio_v2_xxx::lockable_byte_io_handle::extent_guard::unlock |
( |
| ) |
|
|
inlinenoexcept |
Unlocks the locked extent immediately.
213 {
214 if(_h != nullptr)
215 {
218 }
219 }
void release() noexcept
Detach this RAII unlocker from the locked state.
Definition lockable_byte_io_handle.hpp:222
virtual void unlock_file_range(extent_type offset, extent_type bytes) noexcept
EXTENSION: Unlocks a byte range previously locked.
The documentation for this class was generated from the following file: