Home
last modified time | relevance | path

Searched hist:"4 edd7e96a1f159f43bd1cb82616f81eaddd54262" (Results 1 – 1 of 1) sorted by relevance

/linux/include/linux/
H A Dkfifo.hdiff 4edd7e96a1f159f43bd1cb82616f81eaddd54262 Fri Apr 05 08:08:14 CEST 2024 Jiri Slaby (SUSE) <jirislaby@kernel.org> kfifo: add kfifo_out_linear{,_ptr}()

These are helpers which are going to be used in the serial layer. We
need a wrapper around kfifo which provides us with a tail (sometimes
"tail" offset, sometimes a pointer) to the kfifo data. And which returns
count of available data -- but not larger than to the end of the buffer
(hence _linear in the names). I.e. something like CIRC_CNT_TO_END() in
the legacy circ_buf.

This patch adds such two helpers.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/r/20240405060826.2521-4-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>