zephyr::raw

Function k_mbox_put

source
pub unsafe extern "C" fn k_mbox_put(
    mbox: *mut k_mbox,
    tx_msg: *mut k_mbox_msg,
    timeout: k_timeout_t,
) -> i32
Expand description

@brief Send a mailbox message in a synchronous manner.

This routine sends a message to @a mbox and waits for a receiver to both receive and process it. The message data may be in a buffer or non-existent (i.e. an empty message).

@param mbox Address of the mailbox. @param tx_msg Address of the transmit message descriptor. @param timeout Waiting period for the message to be received, or one of the special values K_NO_WAIT and K_FOREVER. Once the message has been received, this routine waits as long as necessary for the message to be completely processed.

@retval 0 Message sent. @retval -ENOMSG Returned without waiting. @retval -EAGAIN Waiting period timed out.