Re: [PATCH v2 08/34] locking/rwlock, spinlock: Support Clang's capability analysis

2025-03-04 Thread Peter Zijlstra
On Tue, Mar 04, 2025 at 10:21:07AM +0100, Marco Elver wrote: > To avoid warnings in constructors, the initialization functions mark a > capability as acquired when initialized before guarded variables. Right, took me a bit, but OMG that's a horrific hack :-)

[PATCH v2 08/34] locking/rwlock, spinlock: Support Clang's capability analysis

2025-03-04 Thread Marco Elver
Add support for Clang's capability analysis for raw_spinlock_t, spinlock_t, and rwlock. This wholesale conversion is required because all three of them are interdependent. To avoid warnings in constructors, the initialization functions mark a capability as acquired when initialized before guarded