zephyr::raw

Function k_msgq_peek

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

@brief Peek/read a message from a message queue.

This routine reads a message from message queue @a q in a “first in, first out” manner and leaves the message in the queue.

@funcprops \isr_ok

@param msgq Address of the message queue. @param data Address of area to hold the message read from the queue.

@retval 0 Message read. @retval -ENOMSG Returned when the queue has no message.