newseg(9)
πΈ newseg(9) πΈ
okay bestie, welcome to the Kernel API Manual β yes, the Kernel API Manual, we're in the big leagues now π this one's short and sweet but it's lowkey important, so pay attention π«Ά
β¨ NAME β¨
newseg β it literally creates a new shared memory segment, that's the whole vibe π
β¨ SYNOPSIS β¨
int newseg (struct ipc_namespace *ns , struct ipc_params *params );
that's it. that's the whole call. two args, one int coming back at you, iconic π
β¨ ARGUMENTS β¨
nsβ the namespace, bestie. that's thestruct ipc_namespace *right there πparamsβ a ptr to the structure that containskey,sizeandshmflgβ like, all three of them live in there, so hand over the pointer and let the function do its thing π¦
β¨ DESCRIPTION β¨
okay so here's the one thing you cannot skip, and I mean it, no cap:
Called with shm_ids.rwsem held as a writer. π₯
like, you gotta already be holding it as a writer before this runs β that's the contract, that's the vibe check, don't come in without it π it's giving "read the room before you walk in" energy fr fr.
β¨ SEE ALSO β¨
- Kernel file
./ipc/shm.cβ go read it, it's the main character of this whole story π
and that's the page!! short, sweet, slays πβ¨
signing off with the deets so you have them forever: this one lives under ./ipc, dated October 2026, and the header up top is newseg(9) with the Kernel API Manual energy all over it π bye bestie, go hold that rwsem as a writer π
π¦ 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