kfifo_out(9)
π kfifo_out β a Kernel API Manual moment (this is section 9, bestie, kernel API land)
okay so boom, welcome to the kfifo_out(9) page, lowercase k, all one word, no spaces β that's the vibe, that's the brand, we don't argue with it π
β¨ NAME β¨
kfifo_out β get data from the fifo π«Ά (yes that's literally it, she's a getter, she gets)
πΈ SYNOPSIS πΈ
kfifo_out (fifo , buf , n );
that's the whole call, spaces and all, copy it exactly or the compiler will simply Not π
π¦ ARGUMENTS π¦
fifoβ the address of the fifo you're working with, like, the actual fifo, hand her overbufβ a pointer to the storage buffer, this is where the good stuff landsnβ the max. number of elements to get π (max, bestie, she's a ceiling not a promise)
π DESCRIPTION π
so this macro gets some data from the fifo and returns the numbers of elements copied. that's the whole personality β¨ she's a macro, she takes stuff out, she tells you how much she took.
note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these macro. like, one reader, one writer, that's the whole guest list β no extra locking required π₯ but fr fr, read that condition again, because it is the entire condition, and if your concurrency situation is different that sentence does not cover you π
π SEE ALSO π
kernel file ./include/linux/kfifo.h, and also the entire kfifo cinematic universe, because she did not come alone π
:
DECLARE_KFIFO_PTR(9)DECLARE_KFIFO(9)INIT_KFIFO(9)DEFINE_KFIFO(9)kfifo_initialized(9)kfifo_esize(9)kfifo_recsize(9)kfifo_size(9)kfifo_reset(9)kfifo_reset_out(9)kfifo_len(9)kfifo_is_empty(9)kfifo_is_empty_spinlocked(9)kfifo_is_empty_spinlocked_noirqsave(9)kfifo_is_full(9)kfifo_avail(9)kfifo_skip_count(9)kfifo_skip(9)kfifo_peek_len(9)kfifo_alloc(9)kfifo_alloc_node(9)kfifo_free(9)kfifo_init(9)kfifo_put(9)kfifo_get(9)kfifo_peek(9)kfifo_in(9)kfifo_in_spinlocked(9)kfifo_in_spinlocked_noirqsave(9)kfifo_out_spinlocked(9)kfifo_out_spinlocked_noirqsave(9)kfifo_from_user(9)kfifo_to_user(9)kfifo_dma_in_prepare_mapped(9)kfifo_dma_in_finish(9)kfifo_dma_out_prepare_mapped(9)kfifo_dma_out_finish(9)kfifo_out_peek(9)kfifo_out_linear(9)kfifo_out_linear_ptr(9)
π§ friendly lil heads up: the locking line in DESCRIPTION is doing a lot of heavy lifting β one concurrent reader, one concurrent writer, that's it. don't go adding friends to the fifo and then acting surprised π
and that's the page, bestie π this manual page came to you from the kernel file ./include/linux, dated October 2026, and yes the header/footer said kfifo_out(9) a bunch of times but we already established the vibe π slay, go read your fifo, periodt π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms