class Reservation
Defined at line 90 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
A Reservation is a wrapper around a slot of memory in the ring buffer. It has a predetermined
size that is determined by the size passed into the Reserve method below. Any attempt to write
more than this amount of data into the slot is a programming error and will cause an assertion
failure. This class provides a formal way for writers to serialize data in place in the ring
buffer, thus eliminating the need for a temporary serialization buffer.
Public Methods
void ~Reservation ()
Defined at line 92 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
void Reservation (const Reservation & )
Reservations cannot be copied.
Defined at line 98 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
Reservation & operator= (const Reservation & )
Defined at line 99 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
Reservation & operator= (Reservation && other)
Reservations cannot be move-assigned, as several members are const.
Defined at line 101 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
void Reservation (Reservation && other)
Reservations can be move-constructed.
Defined at line 103 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
void Write (ktl::span<const ktl::byte> data)
Writes the given data into this reservation.
Defined at line 116 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
void Commit ()
Advances the write pointer of the associated spsc buffer. This makes the written data visible
to the reader, and thus can only be called once all Writes have been completed.
Defined at line 154 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
Friends
class SpscBuffer