Re: [RFC PATCH] futex: Introduce __vdso_robust_futex_unlock

From: Thomas Gleixner

Date: Thu Mar 12 2026 - 15:10:55 EST


On Thu, Mar 12 2026 at 10:04, Mathieu Desnoyers wrote:
> On 2026-03-12 09:46, André Almeida wrote:
>> The interface that I would propose here would be a bit more "generic" or
>> "flexible":
>>
>> __vdso_robust_futex_unlock(void *uaddr, int uval, struct
>> robust_list_head *head, unsigned int flags)
>
> I agree on adding explicit "uval" and pointer to robust list head,
> I'm not convinced that the rest is an improvement.
>
> This would require the caller to deal with errors, making it
> more complex than a simple replacement for atomic xchg/cmpxchg.
>
> "flags" could be unsupported, so the handler would have to deal with
> -EINVAL.

What's the problem with that? pthread_mutex_unlock() has a return value
too.