DEFINE_SCX_COMPAT_MARKER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 being scx_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:


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