[PATCH v4 4/7] um: add a UML specific futex implementation
Johannes Berg
johannes at sipsolutions.net
Fri Dec 11 15:10:26 EST 2020
On Fri, 2020-12-11 at 17:45 +0000, anton.ivanov at cambridgegreys.com
wrote:
>
> +++ b/arch/um/include/asm/futex.h
> @@ -0,0 +1,14 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _ASM_GENERIC_FUTEX_H
> +#define _ASM_GENERIC_FUTEX_H
> +
> +#include <linux/futex.h>
> +#include <linux/uaccess.h>
> +#include <asm/errno.h>
> +
> +
> +extern int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr);
> +extern int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
> + u32 oldval, u32 newval);
"extern" for functions in header files is kinda pointless, and usually
not used.
(indentation also seems off a bit)
> +/**
> + * arch_futex_atomic_op_inuser() - Atomic arithmetic operation with constant
> + * argument and comparison of the previous
> + * futex value with another constant.
Is there much value in (copying?) the documentation? It wouldn't get
included anywhere, I'd think.
johannes
More information about the linux-um
mailing list