relay_switch_subbuf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… relay_switch_subbuf β€” like, the kernel API manual, but make it make sense

okay so bestie, welcome to relay_switch_subbuf(9) β€” yes it's a section 9 kernel API page, yes it's from the Kernel API Manual, and yes we're gonna get through it together 🫢


✨ NAME ✨

relay_switch_subbuf β€” switch to a new sub-buffer. that's literally the whole thing, no cap πŸŽ€


🌸 SYNOPSIS 🌸

size_t relay_switch_subbuf (struct rchan_buf *buf , size_t length );

like, that's the signature, character for character, don't @ me πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • buf β€” channel buffer. the buffer for the channel. she's the main character of this function ngl πŸ‘‘
  • length β€” size of current event. as in, how big the event you're currently dealing with is 🌸

⭐ DESCRIPTION ⭐

So what does she do? She returns either the length you passed in, or 0 if full. that's it, that's the return contract, iykyk πŸ’€

And the way she does it?? She performs sub-buffer-switch tasks β€” the little chores of switching over to a fresh sub-buffer β€” such as invoking callbacks, updating padding counts, waking up readers, etc. like she's doing the group project all by herself and honestly? slay 🧚✨

fr fr remember: 0 means full. 0 is not a length, bestie, it's the "we're cooked" signal πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./kernel/relay.c β€” go read it, it's giving source of truth πŸ“–

like, that's the whole relay friend group, and they all ate πŸ”₯


sign-off time 🌈

this little icon came from ./kernel, dated October 2026, and she's filed under relay_switch_subbuf(9). mwah, go switch some sub-buffers bestie πŸ’…πŸ’–

πŸ“¦ where this page comes from