pub unsafe extern "C" fn channel_transact(
object_handle: u32,
send_data: *mut u8,
send_len: usize,
recv_data: *mut u8,
recv_len: usize,
deadline: u64,
) -> isizeExpand description
Perform a synchronous channel transaction
Performs a transaction from the initiator side of a channel and blocks
until the handler side has completed the transaction. send_data and
recv_data may overlap or be the same buffer.
While non-block and infinite blocking semantics are not explicitly supported, they can be effectively achieved with:
- Non-blocking:
deadline== 0 - Infinite blocking:
deadline==u64::MAX
This call will cause Signals::READABLE to be cleared on the initiator
channel object at the beginning of execution. However by the time it
returns without error, Signals::READABLE will be set again.
The maximum size of buffers that may be passed is isize::MAX.
§Returns
>=0: Number of bytes received from the handler side.Error::InvalidArgument:object_handleis not a valid initiator channel object.Error::ResourceExhausted: The channel already has a pending transaction.Error::PermissionDenied:send_dataorrecv_datado not reference valid memory regions in this processes’ address space.Error::DeadlineExceeded: The handler side did not respond beforedeadlinewas exceeded.