__acquires(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 __acquires β€” the Kernel API Manual, bestie edition 🌸

okay so real talk, this is a page from the Kernel API Manual (9 section, kernel-flavoured, you know the vibe) all about __acquires. it's short, it's slay, it's a function attribute. let's get into it πŸŽ€


✨ NAME ✨

__acquires β€” a function attribute, and what it does is: the function acquires a context lock exclusively. that's it. that's the whole thing. it does not release them. periodt πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

__acquires (... );

🧚 ARGUMENTS 🧚

  • ... β€” variable arguments. yes bestie, the literal three dots, it's variadic, it takes variable arguments, no cap πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• β€” __acquires is a function attribute that declares your function acquires the given context lock instance(s) exclusively, but does not release them.

read that again, because the "does not release" part is the whole personality: it grabs the lock, exclusive vibes only, and then it just… walks away. not its job to let go. that's somebody else's problem (hi __releases, we see you πŸ‘€). the context analysis machinery reads this attribute and takes your word for it, so say it about the right function, okay? 🫢


🌈 SEE ALSO 🌈

all the siblings and cousins, living in the kernel file ./include/linux/compiler-context-analysis.h:


ngl, this one's a single-sentence icon. tiny page, big lock energy. don't forget the exclusive part, and don't you dare expect it to release anything πŸ’€

and that's the whole page, bestie β€” brought to you from ./include/linux, dated October 2026. go forth and annotate responsibly πŸ«Άβœ¨πŸ’œ

πŸ“¦ where this page comes from