DECLARE_IDTENTRY(9)
π DECLARE_IDTENTRY π
ok so bestie, real talk: this is a page from the Kernel API Manual (section 9), and it's all about DECLARE_IDTENTRY β like, the macro that declares functions for simple IDT entry points where no error code is pushed by hardware. That's the whole vibe. No error code. Clean entry. Slay.
β¨ SYNOPSIS β¨
DECLARE_IDTENTRY (vector , func );
that's it, that's the whole call. two args, no drama π
π«Ά ARGUMENTS π«Ά
vectorβ the vector number. and yes, it's ignored for C β like, C just does not care, ok? πfuncβ the function name of the entry point. this is the name everything else gets built out of, so pick a good one bestie π
πΈ DESCRIPTION πΈ
okay so this macro declares four functions. four. count 'em:
- the ASM entry point:
asm_##funcβ‘ - the XEN PV trap entry point:
xen_##func(maybe unused π) - the C handler called from the FRED event dispatcher (maybe unused π)
- the C handler called from the ASM entry point
and that's the whole lineup. it's giving "small macro, big responsibilities" ngl π₯
β NOTE β
lowkey important: this is the C variant of DECLARE_IDTENTRY. like the name literally says, it declares the entry points for usage in C code. and there's an ASM variant too β that one is what gets used to emit the entry stubs in entry_32/64.S. two different jobs, two different macros, don't mix them up bestie π
π¦ SEE ALSO π¦
- the Kernel file
./arch/x86/include/asm/idtentry.hβ that's where the magic lives, go read it π DEFINE_IDTENTRY(9)DECLARE_IDTENTRY_ERRORCODE(9)DEFINE_IDTENTRY_ERRORCODE(9)DECLARE_IDTENTRY_RAW(9)DEFINE_IDTENTRY_RAW(9)DEFINE_FREDENTRY_RAW(9)DECLARE_IDTENTRY_RAW_ERRORCODE(9)DEFINE_IDTENTRY_RAW_ERRORCODE(9)DECLARE_IDTENTRY_IRQ(9)DEFINE_IDTENTRY_IRQ(9)DECLARE_IDTENTRY_SYSVEC(9)DEFINE_IDTENTRY_SYSVEC(9)DEFINE_IDTENTRY_SYSVEC_SIMPLE(9)DECLARE_IDTENTRY_XENCB(9)DECLARE_IDTENTRY_IST(9)DECLARE_IDTENTRY_VC(9)DEFINE_IDTENTRY_IST(9)DEFINE_IDTENTRY_NOIST(9)DECLARE_IDTENTRY_DF(9)DEFINE_IDTENTRY_DF(9)DECLARE_IDTENTRY_DF(9)DEFINE_IDTENTRY_DF(9)
(and yes, the last two are listed twice in the original β i'm not gonna gaslight you and pretend otherwise, that's just how it is π)
ok that's the page!! this one comes from ./arch/x86/include/asm, dated October 2026, and it's filed under DECLARE_IDTENTRY(9) β go forth and declare your entry points, bestie, you got this ππ
π¦ 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