Re: [RFC][PATCH 1/4] compiler-context-analysys: Add __cond_releases()

From: Peter Zijlstra

Date: Wed Jan 21 2026 - 15:12:56 EST


On Wed, Jan 21, 2026 at 07:35:14PM +0100, Marco Elver wrote:
> On Wed, 21 Jan 2026 at 18:55, Bart Van Assche <bvanassche@xxxxxxx> wrote:
> >
> > On 1/21/26 3:07 AM, Peter Zijlstra wrote:
> > > +#define __cond_releases(ret, x) __releases(x) __cond_acquires_impl_not_##ret(x)
> >
> > Since we have __cond_acquires() and __cond_acquires_shared(), how about
> > also adding a __cond_releases_shared() macro?
>
> Since I'm a fan of less code, another option is to introduce it when
> needed. It's unlikely to be needed, and until then I'd prefer fewer
> lines of code to be included and maintained. Up to you.

Right, this was an on-demand thing. Lets add it when it becomes needed.