pub unsafe extern "C" fn k_msgq_put_front(
msgq: *mut k_msgq,
data: *const c_void,
) -> i32Expand description
@brief Send a message to the front of a message queue.
This routine sends a message to the beginning (head) of message queue @a q. Messages sent with this method will be retrieved before any pre-existing messages in the queue.
@note if there is no space in the message queue, this function will behave the same as k_msgq_put.
@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.
@note k_msgq_put_front() does not block.
@isr_ok
@param msgq Address of the message queue. @param data Pointer to the message.
@retval 0 Message sent. @retval -ENOMSG Returned without waiting or queue purged.