DEFINE_SCX_COMPAT_MARKER(9)
π DEFINE_SCX_COMPAT_MARKER π
ok so bestie, welcome to the Kernel API Manual entry for DEFINE_SCX_COMPAT_MARKER(9) β yes that trailing (9) means kernel API section, we stay fancy here β¨
πΈ NAME πΈ
DEFINE_SCX_COMPAT_MARKER β define a userspace capability marker, no cap π«Ά
β¨ SYNOPSIS β¨
DEFINE_SCX_COMPAT_MARKER (func );
that's it. that's the whole vibe. one argument, one macro, iconic behavior π
π ARGUMENTS π
funcβ the marker suffix, like the little name tag at the party π·οΈ the symbol you actually define ends up beingscx_compat_marker_func, so yeah, it gets glued onto the end fr fr
π DESCRIPTION π
okay so here's the tea π this macro emits an empty, callerless function β literally nobody calls it, it's giving main character who doesn't need an audience β and that function is retained in the kernel's BTF.
why tho? because its mere presence is part of the kernelβuserspace contract π€ userspace probes scx_compat_marker_func (like, via BTF, for example) to detect that this kernel supports the corresponding feature. it's basically a little "yes bestie, we have that" flag hiding in plain sight π
and the plumbing details, which are lowkey clever: the leading declaration suppresses the missing-prototype warning (thank u, we hate a nagging compiler π), and the trailing declaration consumes the semicolon at the use site β so you can drop it in with a ; and everything's chill π§
π₯ SEE ALSO π₯
all my mutuals in the same kernel file, ./kernel/sched/ext/internal.h:
scx_add_event(9)__scx_add_event(9)struct scx_enable_args(9)struct sched_ext_ops(9)struct sched_ext_ops_cid(9)scx_arena_to_kaddr(9)scx_kaddr_to_arena(9)scx_root_protected_live(9)scx_root_protected(9)scx_bypass_dsp_enabled(9)scx_ops_sanitize_err(9)scx_has_subs(9)scx_task_sched(9)scx_task_sched_rcu(9)scx_task_on_sched(9)scx_prog_sched(9)scx_parent(9)
ok that's the whole page bestie, go forth and probe responsibly π
sign-off time π this one lives in ./kernel/sched/ext and it's dated October 2026 β slay, see u in the next release cycle, mwah π
π¦ 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