__acquires(9)
πΈ __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:
__guarded_by(9)__pt_guarded_by(9)context_lock_struct(9)disable_context_analysis(9)enable_context_analysis(9)__no_context_analysis(9)context_unsafe(9)__context_unsafe(9)context_unsafe_alias(9)token_context_lock(9)token_context_lock_instance(9)__must_hold(9)__must_not_hold(9)__cond_acquires(9)__releases(9)__cond_releases(9)__acquire(9)__release(9)__must_hold_shared(9)__acquires_shared(9)__cond_acquires_shared(9)__releases_shared(9)__acquire_shared(9)__release_shared(9)__acquire_ret(9)__acquire_shared_ret(9)
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
- 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