Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_kernel
  5. syscall_defs
  6. channel_transact

channel_transact

Function channel_transact 

Source
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,
) -> isize
Expand 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