PORTFEATURES(9)

πŸ“¦ version 11.0, in nixpkgs unstable

✨ NAME ✨

Okay so bestie, welcome to portfeatures β€” literally section 9 of the Kernel Developer's Manual, and the vibe is β€œthe __HAVEs (and the have nots)” πŸ’…. This is your group chat for the __HAVE_feature macros, with the tea on what each one means and where to find the full details.


πŸ’– DESCRIPTION πŸ’–

Machine-independent kernel code adapts to differences in hardware capabilities provided by the machine-dependent parts of the kernel. A port declares its capabilities by defining various __HAVE_feature macros. This manual page is lowkey the index of those macros, with pointers to other manual pages in the kernel section that provide all the relevant details. No cap, it's giving useful-index energy. πŸ¦‹

  • __HAVE_MUTEX_STUBS (mutex(9)) β€” the port provides fast path mutex enter and exit stubs. Slay, mutex fast path. ✨
  • __HAVE_PREEMPTION (cpu_need_resched(9)) β€” the port can preempt kernel lwps with RESCHED_KPREEMPT. Preemption main character energy fr fr.
  • __HAVE_PROCFS_MACHDEP β€” the port has MD procfs nodes, and defines additional values for the pfstype enum for each type. Iconic enum expansion behavior.
  • __HAVE_PTRACE_MACHDEP β€” the port has MD ptrace(2) requests, and defines the PTRACE_MACHDEP_REQUEST_CASES macro with case labels for its MD requests. That macro name is a whole mouthful and I'm obsessed. 😭
  • __HAVE_RAS (ras(9)) β€” the port supports restartable atomic sequences. RAS ate, no notes. πŸ”₯
  • __HAVE_SIMPLE_MUTEXES (mutex(9)) β€” the port provides a CAS function that is either MP-safe, or does not need to be MP safe. Adaptive mutexes on these architectures do not require an additional interlock. Lowkey a whole vibe.
  • __HAVE_SPIN_MUTEX_STUBS (mutex(9)) β€” the port provides fast path enter and exit stubs for spin mutexes. Spin mutex stubs, periodt. πŸ’…
  • __HAVE_UCAS_FULL (ucas(9)) β€” the port provides a full implementation of the low-level primitives required for atomic compare-and-swap operations to user-space addresses. Full send. 🫢
  • __HAVE_UCAS_MP (ucas(9)) β€” the port does not provide a full implementation of the low-level primitives required for atomic compare-and-swap operations to user-space addresses, but does provide an implementation of those primitives that can be used if (and only if) the system has more than one processor. That β€œif (and only if)” is literally doing work, bestie β€” not optional. πŸ’€

That's the whole vibe check: source/version is Debian, dated July 27, 2025, and the page is literally PORTFEATURES(9). Go off, and may your port declare its __HAVE_feature macros with main character energy. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from