Skip to main content

k_msgq_cleanup

Function k_msgq_cleanup 

Source
pub unsafe extern "C" fn k_msgq_cleanup(msgq: *mut k_msgq) -> i32
Expand description

@brief Release allocated buffer for a queue

Releases memory allocated for the ring buffer. The buffer is only freed if it was allocated by k_msgq_alloc_init(); the call succeeds but frees nothing for a caller-provided buffer. Any messages still in the queue are discarded with the buffer.

@param msgq message queue to cleanup

@retval 0 on success @retval -EBUSY Threads are waiting on the message queue