relay_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… relay_write(9) β€” aka the Kernel API Manual, bestie edition ✨

Okay so like, hi, welcome to relay_write(9) from the Kernel API Manual πŸŽ€ β€” this is the function you call when you literally just want your data to end up in the relay channel and you're not tryna overthink it. Let's get into it πŸ¦‹


✨ NAME ✨

relay_write β€” write data into the channel πŸ’«

🌸 SYNOPSIS 🌸

void relay_write (struct rchan *chan , const void *data , size_t length );

πŸ’– ARGUMENTS πŸ’–

  • chan β€” the relay channel, obvi 🫢
  • data β€” the actual data to be written, the main character of this whole operation πŸ‘‘
  • length β€” number of bytes to write, so like, how much of data we're serving up πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

Writes data into the current cpu's channel buffer. That's it, that's the vibe ✨

It protects the buffer by disabling interrupts πŸ›‘οΈ β€” so slay, no cap, your buffer stays safe.

Use this if you might be logging from interrupt context πŸ‘€ because that's literally the whole point of the interrupt-disabling protection. But if you know you won't be logging from interrupt context, then try __relay_write instead β€” she's the lighter-weight option, iykyk πŸ’…

bestie pls note: the interrupt-disabling is doing real work here, so don't just casually swap in __relay_write unless you're 100% sure about your context fr fr 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/relay.h β€” plus __relay_write(9), relay_reserve(9), and subbuf_start_reserve(9) πŸ’œ


and that's the whole page, mwah πŸ’‹ β€” this lil icon dropped from ./include/linux, dated October 2026, and it's the relay_write(9) page itself signing off 🧚🌸 go forth and log responsibly bestie ✨

πŸ“¦ where this page comes from