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_respond

channel_respond

Function channel_respond 

Source
pub unsafe extern "C" fn channel_respond(
    object_handle: u32,
    buffer: *mut u8,
    buffer_len: usize,
) -> isize
Expand description

Respond to and complete a pending transaction

Causes the kernel to copy buffer into the initiator’s recv_buffer and set Signals::READABLE on the initiator channel object.

The maximum size of buffer that may be passed is isize::MAX.

§Returns

  • 0: On success.
  • Error::OutOfRange: The initiator’s recv_buffer is not large enough to fit the provided buffer.
  • Error::Unavailable: No transaction was pending on the channel. This can happen in the middle of handling a transaction if the initiator cancels the transaction.
  • Error::PermissionDenied: buffer does not reference a valid memory region in this processes’ address space.