From 344ce4277885e448912fdfc35bcfaf130c74d086 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Fri, 3 May 2019 11:46:55 -0700 Subject: session/svm: apis for fifo shrinking Change-Id: Ie519683bb90aae6fb95f2a09e251cded1890ed41 Signed-off-by: Florin Coras --- src/svm/fifo_segment.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/svm/fifo_segment.h') diff --git a/src/svm/fifo_segment.h b/src/svm/fifo_segment.h index 6ff538fcc07..bb4f4080502 100644 --- a/src/svm/fifo_segment.h +++ b/src/svm/fifo_segment.h @@ -128,6 +128,15 @@ void fifo_segment_preallocate_fifo_pairs (fifo_segment_t * fs, */ int fifo_segment_grow_fifo (fifo_segment_t * fs, svm_fifo_t * f, u32 chunk_size); + +/** + * Collect unused chunks for fifo + * + * @param fs fifo segment for fifo + * @param f fifo whose chunks are to be collected + * @return 0 on success, error otherwise + */ +int fifo_segment_collect_fifo_chunks (fifo_segment_t * fs, svm_fifo_t * f); u8 fifo_segment_has_fifos (fifo_segment_t * fs); svm_fifo_t *fifo_segment_get_fifo_list (fifo_segment_t * fs); u32 fifo_segment_num_fifos (fifo_segment_t * fs); -- cgit 1.2.3-korg