class RingBufferState
Defined at line 33 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
Internal state backing RingBuffer. Refer to that class for the public API.
This class is not movable or copyable.
This class is thread-safe.
Public Methods
zx_status_t Reserve (uint64_t blocks, RingBufferReservation * out)
Reserves space for |blocks| contiguous blocks in the circular buffer.
To perform optimally, these reservations should be destroyed in the same order
they are reserved.
|blocks| must be greater than zero.
Returns ZX_ERR_NO_SPACE if there is not enough room.
Defined at line 17 of file ../../zircon/system/ulib/storage/buffer/ring_buffer.cc
void Free (const RingBufferReservation & reservation)
Frees |reservation| from the buffer.
Only callable by |RingBufferReservation|, since this frees the previously used
reservation.
Defined at line 34 of file ../../zircon/system/ulib/storage/buffer/ring_buffer.cc
void RingBufferState (VmoBuffer buffer)
Defined at line 35 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
void RingBufferState (const RingBufferState & )
Defined at line 37 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
RingBufferState & operator= (const RingBufferState & )
Defined at line 38 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
void RingBufferState (RingBufferState && other)
Defined at line 39 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
RingBufferState & operator= (RingBufferState && other)
Defined at line 40 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
void ~RingBufferState ()
Defined at line 41 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
size_t capacity ()
Returns the total amount of pending blocks which may be buffered.
Defined at line 53 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
uint32_t BlockSize ()
Defined at line 55 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
void * Data (size_t index)
Returns data starting at block |index| in the buffer.
Only callable by |RingBufferReservation|, since this uses the previously created
reservation.
Defined at line 67 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
VmoBuffer * buffer ()
Returns a pointer to the underlying buffer. Should only be accessible to the
|RingBufferReservation|, which should take caution to only reference reserved portions
of the buffer itself.
Defined at line 72 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
const VmoBuffer * buffer ()
Defined at line 73 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h
vmoid_t vmoid ()
Returns the vmoid of the underlying RingBuffer.
Only callable by |RingBufferReservation|, since this uses the previously created
reservation.
Defined at line 79 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/ring_buffer.h