diff options
Diffstat (limited to 'linux-headers/include/linux/futex.h')
-rw-r--r-- | linux-headers/include/linux/futex.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/linux-headers/include/linux/futex.h b/linux-headers/include/linux/futex.h index 5f362e4..9278e08 100644 --- a/linux-headers/include/linux/futex.h +++ b/linux-headers/include/linux/futex.h @@ -44,10 +44,42 @@ 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. + * + * NOTE: these are not pure flags, they can also be seen as: + * + * union { + * u32 flags; + * struct { + * u32 size : 2, + * numa : 1, + * : 4, + * private : 1; + * }; + * }; + */ +#define FUTEX2_SIZE_U8 0x00 +#define FUTEX2_SIZE_U16 0x01 +#define FUTEX2_SIZE_U32 0x02 +#define FUTEX2_SIZE_U64 0x03 +#define FUTEX2_NUMA 0x04 +#define FUTEX2_MPOL 0x08 + /* 0x10 */ + /* 0x20 */ + /* 0x40 */ +#define FUTEX2_PRIVATE FUTEX_PRIVATE_FLAG + +#define FUTEX2_SIZE_MASK 0x03 + +/* do not use */ +#define FUTEX_32 FUTEX2_SIZE_U32 /* historical accident :-( */ + +/* + * When FUTEX2_NUMA doubles the futex word, the second word is a node value. + * The special value -1 indicates no-node. This is the same value as + * NUMA_NO_NODE, except that value is not ABI, this is. */ -#define FUTEX_32 2 +#define FUTEX_NO_NODE (-1) /* * Max numbers of elements in a futex_waitv array |