class Reservation
Defined at line 91 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 93 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 99 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
Reservation & operator= (const Reservation & )
Defined at line 100 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 102 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 104 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 117 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 155 of file ../../zircon/kernel/lib/spsc_buffer/include/lib/spsc_buffer/spsc_buffer.h
Friends
class SpscBuffer