STRUCT EXTCONTEXT(9)
๐ NAME ๐
struct extcontext โ the extended context header structure, aka the lil' header that kicks off every extended context block ๐
oh and btw this page lives in the Kernel API Manual, section 9, bestie ๐ซถ
โจ SYNOPSIS โจ
struct extcontext {
unsigned int magic;
unsigned int size;
};
like... that's it. two fields. iconic minimalism ๐
๐ธ Members ๐ธ
magicโ the magic value, and no it's not a vibe, it's literally what tells you which type of extended context you're looking at ๐ฎโจsizeโ the size, in bytes, of the enclosing structure. yes the whole thing. she's measuring the fit ๐
๐ฆ Description ๐ฆ
okay so picture this: extended context structures are here to carry context that just does not fit inside struct sigcontext. she simply doesn't have the room, bestie ๐ญ
so instead they get placed sequentially in memory, right at the end of struct ucontext and struct sigframe. and each one of those extended context structures starts with a header โ and that header is literally this struct. main character energy ๐
the type of context being represented? indicated by the magic field, periodt. userland can go through each extended context structure and check it against the magic values it recognises ๐โจ
and the size field is the glow-up that makes the whole thing future-proof ๐ it lets any unrecognised context get skipped right over โ so future expansion is totally fine, no cap ๐
the end of the extended context data is indicated by the magic value END_EXTCONTEXT_MAGIC. that's the "we're done here" signal, iykyk ๐ฌ
๐ SEE ALSO ๐
- Kernel file
./arch/mips/include/uapi/asm/ucontext.hstructmsa_extcontext(9) struct ucontext(9)
okay that's the whole page bestie, go forth and check your magics ๐
source file: ./arch/mips/include/uapi/asm ยท version: Kernel API Manual ยท dated: October 2026 ยท titled struct extcontext(9) ๐
๐ฆ 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