On Tue, May 6, 2025 at 5:59 AM Vlastimil Babka <vbabka@xxxxxxx> wrote: > > On 5/1/25 05:27, Alexei Starovoitov wrote: > > From: Alexei Starovoitov <ast@xxxxxxxxxx> > > > > Introduce local_lock_is_locked() that returns true when > > given local_lock is locked by current cpu (in !PREEMPT_RT) or > > by current task (in PREEMPT_RT). > > > > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> > > On !RT this only works for local_trylock_t, which is fine, but maybe make it > part of the name then? local_trylock_is_locked()? Prior to _Generic() conversion it would make sense, but now it will be inconsistent. Type name is not part of the helper name. It's local_lock, local_unlock, local_lock_is_taken. local_trylock() might not even be used at all.