# Re: \[RFC\]\[PATCH 04/10\] futex: Add sys\_futex\_wake()

- From: Arnd Bergmann \<arnd@arndb.de\>
- Date: 2023-07-14 14:27:43 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2023/07/2265663
- Thread: https://ratatoskr.run/linux-api/2023/07/2265637/t.md

```text
On Fri, Jul 14, 2023, at 15:39, Peter Zijlstra wrote:
>
> +++ b/include/linux/syscalls.h
> @@ -563,6 +563,9 @@ asmlinkage long sys_set_robust_list(stru
>  asmlinkage long sys_futex_waitv(struct futex_waitv *waiters,
>  				unsigned int nr_futexes, unsigned int flags,
>  				struct __kernel_timespec __user *timeout, clockid_t clockid);
> +
> +asmlinkage long sys_futex_wake(void __user *uaddr, int nr, unsigned 
> int flags, u64 mask);
> +

You can't really use 'u64' arguments in portable syscalls, it causes
a couple of problems, both with defining the user space wrappers,
and with compat mode.

Variants that would work include:

- using 'unsigned long' instead of 'u64'
- passing 'mask' by reference, as in splice()
- passing the mask in two u32-bit arguments like in llseek()

Not sure if any of the above work for you.

       Arnd
```
