relay_reserve(9)
π relay_reserve(9) β the Kernel API Manual, bestie edition π
okay so you're in the <pink>Kernel API Manual</pink>, section 9, and the star of the show is relay_reserve β yes that's the whole name, no cap β¨
π NAME π
relay_reserve β reserve a slot in the channel buffer π«Ά like grabbing your seat before the group chat descends, except it's bytes and it's kernel land
πΈ SYNOPSIS πΈ
void * relay_reserve (struct rchan *chan , size_t length );
literally that's it, that's the whole vibe check π
π¦ ARGUMENTS π¦
chanβ the relay channel π your main character struct, the one holding the bufferlengthβ number of bytes to reserve π how much room you're claiming, in bytes, exactly
β¨ DESCRIPTION β¨
Returns a pointer to the reserved slot, and NULL if it's full π so pls check that return value, i'm begging
What it actually does: it reserves a slot in the <cyan>current cpu's</cyan> channel buffer π₯ current CPU, not some other one, keep that in mind bestie
β οΈ and here's the important part π it does not protect the buffer at all β the caller has to provide the appropriate synchronization. that's on you, not on it. no cap, it will not save you π
π SEE ALSO π
Kernel file ./include/linux/relay.h π plus these iconic siblings:
and that's the whole page, periodt π§ from ./include/linux, October 2026 β mwah, go reserve some slots responsibly, iykyk πβ¨π
π¦ 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