Messages in this thread | | | From | Arnd Bergmann <> | Date | Fri, 26 Nov 2021 08:27:06 +0100 | Subject | Re: [PATCH v3 5/6] uapi: futex: Add a futex waitv syscall |
| |
On Fri, Nov 26, 2021 at 7:00 AM Alistair Francis <alistair.francis@opensource.wdc.com> wrote: > > From: Alistair Francis <alistair.francis@wdc.com> > > This commit adds a futex waitv syscall wrapper that is exposed to > userspace. > > Neither the kernel or glibc currently expose a futex wrapper, so > userspace is left performing raw syscalls. As the futex_waitv syscall > always expects a 64-bit time_t this can be tricky for 32-bit systems to > get correct. > > In order to avoid userspace incorrectly passing the wrong timeouts let's > expose a public helper function that ensures the kernel is passed the > correct timeout struct. > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de> > +/** > + * futex_waitv - Wait at multiple futexes, wake on any > + * @waiters: Array of waiters > + * @nr_waiters: Length of waiters array > + * @flags: Operation flags > + * @timo: Optional timeout for operation > + */ > +static inline int > +__kernel_futex_syscall_waitv(volatile struct futex_waitv *waiters, unsigned long nr_waiters, > + unsigned long flags, struct timespec *timo, clockid_t clockid)
Same thing about the mismatched function name
Arnd
| |