zephyr::raw

Function k_msgq_put

source
pub unsafe extern "C" fn k_msgq_put(
    msgq: *mut k_msgq,
    data: *const c_void,
    timeout: k_timeout_t,
) -> i32
Expand description

@brief Send a message to a message queue.

This routine sends a message to message queue @a q.

@note The message content is copied from @a data into @a msgq and the @a data pointer is not retained, so the message content will not be modified by this function.

@funcprops \isr_ok

@param msgq Address of the message queue. @param data Pointer to the message. @param timeout Waiting period to add the message, or one of the special values K_NO_WAIT and K_FOREVER.

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