kfifo_out_peek(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is the manual page for kfifo_out_peek(9) β€” Kernel API Manual bestie edition πŸ’… and the one-liner is literally: kfifo_out_peek β€” gets some data from the fifo. No cap, that's the whole vibe check.

✨ SYNOPSIS ✨

kfifo_out_peek (fifo , buf , n );

πŸŽ€ ARGUMENTS πŸŽ€

  • fifo β€” the address of the fifo to be used. That's your little fifo homegirl 🫢
  • buf β€” pointer to the storage buffer. This is where the copied data lands, bestie πŸ’–
  • n β€” max. number of elements to get. Like, the upper limit, periodt ✨

🌸 DESCRIPTION 🌸

This macro gets the data from the fifo and returns the numbers of elements copied. The data is not removed from the fifo β€” it's giving peek-only, not pop-and-drop πŸ’…

heads up, bestie: note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these macro. That's the whole lock-free iykyk moment ✨

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/kfifo.h β€” and the whole kfifo squad, no cap:


byeee 🌈 source/version: ./include/linux Β· date: October 2026 Β· page: kfifo_out_peek(9) πŸ’–

πŸ“¦ where this page comes from