[−][src]Function sunrise_kernel::syscalls::reply_and_receive_with_user_buffer
pub fn reply_and_receive_with_user_buffer(
buf: UserSpacePtrMut<[u8]>,
handles: UserSpacePtr<[u32]>,
reply_target: u32,
timeout: usize
) -> Result<usize, UserspaceError>
If ReplyTarget is not zero, a reply from the given buffer will be sent to that session. Then it will wait until either of the passed sessions has an incoming message, is closed, a passed port has an incoming connection, or the timeout expires. If there is an incoming message, it is copied to the TLS.
If ReplyTarget is zero, the buffer should contain a blank message. If this message has a C descriptor, the buffer it points to will be used as the pointer buffer. See IPC_Marshalling#IPC_buffers. Note that a pointer buffer cannot be specified if ReplyTarget is not zero.
After being validated, passed handles will be enumerated in order; even if a session has been closed, if one that appears earlier in the list has an incoming message, it will take priority and a result code of 0x0 will be returned.