Thread (60 messages) 60 messages, 8 authors, 2024-10-28

Re: [PATCH v1 09/14] futex: Add sys_futex_requeue()

From: Peter Zijlstra <peterz@infradead.org>
Date: 2023-07-31 17:39:13
Also in: linux-arch, linux-mm, lkml

On Mon, Jul 31, 2023 at 07:19:17PM +0200, Thomas Gleixner wrote:
On Fri, Jul 21 2023 at 12:22, Peter Zijlstra wrote:
quoted
+/*
+ * sys_futex_requeue - Requeue a waiter from one futex to another
+ * @waiters:	array describing the source and destination futex
+ * @flags:	unused
+ * @nr_wake:	number of futexes to wake
+ * @nr_requeue:	number of futexes to requeue
+ *
+ * Identical to the traditional FUTEX_CMP_REQUEUE op, except it is part of the
+ * futex2 family of calls.
+ */
+
+SYSCALL_DEFINE4(futex_requeue,
+		struct futex_waitv __user *, waiters,
+		unsigned int, flags,
+		int, nr_wake,
+		int, nr_requeue)
+{
+	struct futex_vector futexes[2];
+	u32 cmpval;
So this is explictely u32. I'm completely confused vs. the 64 bit futex
size variant enablement earlier in the series by now.
As per the previous email; these patches only enable the syscall part of
64bit futexes, they do not convert the core, and per futex_flags_valid()
(patches 4 and 13), explicitly disallow having FUTEX2_64 set.


-       /* Only 32bit futexes are implemented -- for now */
-       if ((flags & FLAGS_SIZE_MASK) != FLAGS_SIZE_32)
+       /* 64bit futexes aren't implemented -- yet */
+       if ((flags & FLAGS_SIZE_MASK) == FLAGS_SIZE_64)
		return false;

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help