class Cbuf
Defined at line 20 of file ../../zircon/kernel/lib/cbuf/include/lib/cbuf.h
Public Methods
void Initialize (size_t len, void * buf)
Initialize
Initialize a cbuf structure using the supplied buffer for internal storage.
Parameters
Defined at line 26 of file ../../zircon/kernel/lib/cbuf/cbuf.cc
void Cbuf ()
Constructor
Create a Cbuf structure with no underlying data buffer. A subsequent call to |Initialize| must
be made to allocate an underlying data buffer.
Defined at line 36 of file ../../zircon/kernel/lib/cbuf/include/lib/cbuf.h
bool Full ()
Full
Whether the Cbuf has free space available.
Defined at line 39 of file ../../zircon/kernel/lib/cbuf/cbuf.cc
zx::result<char> ReadChar (bool block)
Read one character.
If |wait| is true, block until a character is read or the thread is asked to suspend or
terminate (ZX_ERR_INTERNAL_INTR_RETRY, ZX_ERR_INTERNAL_INTR_KILLED).
If |wait| is false and no character is ready, ZX_ERR_SHOULD_WAIT is returned.
Defined at line 63 of file ../../zircon/kernel/lib/cbuf/include/lib/cbuf.h
zx::result<ReadContext> ReadCharWithContext (bool block)
Same as ReadChar(bool block), but returns |ReadContext| instead of just the read character.
Defined at line 67 of file ../../zircon/kernel/lib/cbuf/cbuf.cc
size_t WriteChar (char c)
Defined at line 45 of file ../../zircon/kernel/lib/cbuf/cbuf.cc