kfifo_out(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 over
  • buf β€” a pointer to the storage buffer, this is where the good stuff lands
  • n β€” 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 πŸ’…:


🧚 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