zephyr::raw

Function k_queue_alloc_prepend

source
pub unsafe extern "C" fn k_queue_alloc_prepend(
    queue: *mut k_queue,
    data: *mut c_void,
) -> i32
Expand description

@brief Prepend an element to a queue.

This routine prepends a data item to @a queue. There is an implicit memory allocation to create an additional temporary bookkeeping data structure from the calling thread’s resource pool, which is automatically freed when the item is removed. The data itself is not copied.

@funcprops \isr_ok

@param queue Address of the queue. @param data Address of the data item.

@retval 0 on success @retval -ENOMEM if there isn’t sufficient RAM in the caller’s resource pool