summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorpeterz@infradead.org <peterz@infradead.org>2023-09-21 12:45:06 +0200
committerPeter Zijlstra <peterz@infradead.org>2023-09-21 19:22:04 +0200
commit4923954bbc4a760e0b2210e0cb5733726ac2e2e9 (patch)
treedc148ad41454f6eb031a9d569b81f6bb40badaa0 /include/uapi
parentc6f4a90022524d06f6d9de323b1757031dcf0c26 (diff)
futex: Clarify FUTEX2 flags
sys_futex_waitv() is part of the futex2 series (the first and only so far) of syscalls and has a flags field per futex (as opposed to flags being encoded in the futex op). This new flags field has a new namespace, which unfortunately isn't super explicit. Notably it currently takes FUTEX_32 and FUTEX_PRIVATE_FLAG. Introduce the FUTEX2 namespace to clarify this Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: André Almeida <andrealmeid@igalia.com> Link: https://lore.kernel.org/r/20230921105247.507327749@noisy.programming.kicks-ass.net
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/futex.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h
index 71a5df8d2689..21d4eff41162 100644
--- a/include/uapi/linux/futex.h
+++ b/include/uapi/linux/futex.h
@@ -44,10 +44,20 @@
FUTEX_PRIVATE_FLAG)
/*
- * Flags to specify the bit length of the futex word for futex2 syscalls.
- * Currently, only 32 is supported.
+ * Flags for futex2 syscalls.
*/
-#define FUTEX_32 2
+ /* 0x00 */
+ /* 0x01 */
+#define FUTEX2_SIZE_U32 0x02
+ /* 0x04 */
+ /* 0x08 */
+ /* 0x10 */
+ /* 0x20 */
+ /* 0x40 */
+#define FUTEX2_PRIVATE FUTEX_PRIVATE_FLAG
+
+/* do not use */
+#define FUTEX_32 FUTEX2_SIZE_U32 /* historical accident :-( */
/*
* Max numbers of elements in a futex_waitv array