Re: [RFC PATCH] futex: Introduce __vdso_robust_futex_unlock

From: Thomas Gleixner

Date: Thu Mar 12 2026 - 16:20:08 EST


On Thu, Mar 12 2026 at 10:46, André Almeida wrote:
> Em 11/03/2026 15:54, Mathieu Desnoyers escreveu:
> I would also have `uval` instead of `val = 0`, because even though the
> most common semanthics for futex is that (LOCK_FREE == 0), futex has no
> predetermined semanthics of what each value means, and the userspace is
> free to choose what value they want to choose for a free lock.

That's true for non-robust futexes, but robust futexes have clearly
defined semantics vs. the userspace value:

0: unlocked
!= 0: PID of the owner

So uval is useless as the unlock value can't be anything else than 0,
no?

Thanks,

tglx