class Reservation
Defined at line 42 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
Reservation encapsulates a pending write to the buffer.
This class implements the fxt::Writer::Reservation trait, which is required by the FXT
serializer.
It is absolutely imperative that interrupts remain disabled for the lifetime of this class.
Enabling interrupts at any point during the lifetime of this class will break the
single-writer invariant of each per-CPU buffer and lead to subtle concurrency bugs that may
manifest as corrupt trace data. Unfortunately, there is no way for us to programmatically
ensure this, so we do our best by asserting that interrupts are disabled in every method of
this class. It is therefore up to the caller to ensure that interrupts are disabled for the
lifetime of this object.
Public Methods
void ~Reservation ()
Defined at line 44 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
void Reservation (const Reservation & )
Disallow copies and move assignment, but allow moves.
Disallowing move assignment allows the saved interrupt state to be const.
Defined at line 48 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
Reservation & operator= (const Reservation & )
Defined at line 49 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
Reservation & operator= (Reservation && )
Defined at line 50 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
void Reservation (Reservation && other)
Defined at line 51 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
void WriteWord (uint64_t word)
Defined at line 55 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
void WriteBytes (const void * bytes, size_t num_bytes)
Defined at line 60 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
void Commit ()
Defined at line 75 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
zx::result<Reservation> FromSpscReservation (zx::result<BufferImpl::Reservation> reservation, uint64_t header)
Defined at line 80 of file ../../zircon/kernel/lib/percpu_writer/include/lib/percpu_writer/buffer.h
Friends
class Buffer