Re: [PATCH v4 02/35] compiler-context-analysis: Add infrastructure for Context Analysis with Clang
From: Peter Zijlstra
Date: Fri Dec 12 2025 - 04:32:12 EST
On Thu, Dec 11, 2025 at 02:12:19PM +0100, Marco Elver wrote:
> What's a better name?
That must be the hardest question in programming; screw this P-vs-NP
debate :-)
> context_lock_struct -> and call it "context lock" rather than "context
> guard"; it might work also for things like RCU, PREEMPT, BH, etc. that
> aren't normal "locks", but could claim they are "context locks".
>
> context_handle_struct -> "context handle" ...
Both work for me I suppose, although I think I have a slight preference
to the former: 'context_lock_struct'.
One other possibility is wrapping things like so:
#define define_context_struct(name) ... // the big thing
#define define_lock_struct(name) define_context_struct(name)