STORE(9)
π STORE π
okay bestie, welcome to STORE(9) β that's section 9 of the Kernel Developer's Manual, so you already know this is kernel-dev territory, not your lil' userland playground. no cap. β¨
β¨ NAME β¨
store, subyte, suword β the whole squad that stores data to user-space. π«Ά
πΈ SYNOPSIS πΈ
#include <sys/types.h>
#include <sys/time.h>
#include <sys/systm.h>
int
subyte(volatile void *base, int byte);
int
suword(volatile void *base, long word);
int
suword16(volatile void *base, int word);
int
suword32(volatile void *base, int32_t word);
int
suword64(volatile void *base, int64_t word);
#include <sys/resourcevar.h>
not me noticing that last #include <sys/resourcevar.h> just vibing at the bottom of the synopsis π yeah bestie, that's exactly how it's written, we keep it.
π DESCRIPTION π
so the store functions exist to copy small amounts of data over to user-space. tiny little transfers, main character energy, no drama. β¨
if the write actually goes through, it's performed atomically β the way that it just lands, all at once, no half-sends. π
but β and this is the important part, bestie, lowkey do not skip this β the data written must be naturally aligned. that's the rule. respect it. π
here's the whole roster and what each one does:
subyte()β stores a byte of data to the user-space addressbase. one lil' byte, iconic.suword()β stores a word of data to the user-space addressbase.suword16()β stores 16 bits of data to the user-space addressbase. half a word, still slaying.suword32()β stores 32 bits of data to the user-space addressbase.suword64()β stores 64 bits of data to the user-space addressbase. the big one. absolute unit. π
β RETURN VALUES β
the store functions are so simple about it:
0β success π (ate, no crumbs)-1β failure π (it's giving "did not work")
π¦ SEE ALSO π¦
the little sibling pages, fr fr β if store is the "put it there", these are the rest of the family. go read them, bestie. πβ¨
and that's the whole vibe, babe. this lil' page lives in the Debian corner of the kernel dev manual, dated April 17, 2018, filed under STORE(9). π©· thank u for coming to my ted talk, now go align your data properly. periodt. ππ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1996 Jason R. Thorpe
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms