class Message

Defined at line 23 of file ../../src/devices/block/drivers/core/message.h

A single unit of work transmitted to the underlying block layer.

Message contains a block_op_t, which is dynamically sized. Therefore, it implements its

own allocator that takes block_op_size.

Public Methods

zx_status_t Create (fbl::RefPtr<IoBuffer> iobuf, Server * server, BlockFifoRequest * req, size_t block_op_size, MessageCompleter completer, std::unique_ptr<Message> * out)

Allocate a new, uninitialized Message whose block_op begins in a memory region that

is block_op_size bytes long.

Defined at line 11 of file ../../src/devices/block/drivers/core/message.cc

void Message (const Message & )

Defined at line 25 of file ../../src/devices/block/drivers/core/message.h

void Message (Message && )

Defined at line 25 of file ../../src/devices/block/drivers/core/message.h

Message & operator= (const Message & )

Defined at line 25 of file ../../src/devices/block/drivers/core/message.h

Message & operator= (Message && )

Defined at line 25 of file ../../src/devices/block/drivers/core/message.h

void * operator new (size_t size)

Overloaded new operator allows variable-sized allocation to match block op size.

Defined at line 28 of file ../../src/devices/block/drivers/core/message.h

void Complete ()

End the transaction specified by reqid and group, and release iobuf.

Defined at line 28 of file ../../src/devices/block/drivers/core/message.cc

void * operator new (size_t size, size_t block_op_size)

Defined at line 29 of file ../../src/devices/block/drivers/core/message.h

void operator delete (void * msg, size_t block_op_size)

Defined at line 32 of file ../../src/devices/block/drivers/core/message.h

zx_status_t result ()

Defined at line 43 of file ../../src/devices/block/drivers/core/message.h

void set_result (zx_status_t res)

Defined at line 44 of file ../../src/devices/block/drivers/core/message.h

block_op_t * Op ()

Defined at line 46 of file ../../src/devices/block/drivers/core/message.h

void Message (uint32_t data_size, uint32_t num_handles)

|data_size| specifies the size of the data to transfer, not including the txid.

|num_handles| specifies the number of handles to create and transfer.

Defined at line 970 of file ../../src/devices/bin/driver_runtime/channel_test.cc

void Message (uint32_t data_size, cpp20::span<zx_handle_t> handles)

|handles| specifies the handles that should be transferred, rather than creating new ones.

Defined at line 974 of file ../../src/devices/bin/driver_runtime/channel_test.cc

zx_status_t Write (const fdf::Channel & channel, const fdf::Arena & arena, fdf_txid_t txid)

Writes a message to |channel|, with the data and handle buffers allocated using |arena|.

Defined at line 1004 of file ../../src/devices/bin/driver_runtime/channel_test.cc

zx::result<fdf::Channel::ReadReturn> Call (const fdf::Channel & channel, const fdf::Arena & arena, zx::time deadline)

Synchronously calls to |channel|, with the data and handle buffers allocated using |arena|.

Defined at line 1018 of file ../../src/devices/bin/driver_runtime/channel_test.cc

bool IsEquivalent (fdf::Channel::ReadReturn & read)

Returns whether |read| contains the expected data and number of handles.

Defined at line 1082 of file ../../src/devices/bin/driver_runtime/channel_test.cc