linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@collabora.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	peterz@infradead.org
Cc: krisman@collabora.com, kernel@collabora.com,
	dvhart@infradead.org, mingo@redhat.com,
	pgriffais@valvesoftware.com, fweimer@redhat.com,
	libc-alpha@sourceware.org, malteskarupke@web.de,
	linux-api@vger.kernel.org, arnd@arndb.de
Subject: Re: [RFC v2 1/4] futex2: Add new futex interface
Date: Thu, 9 Jul 2020 21:19:47 -0300	[thread overview]
Message-ID: <9d09639f-6821-8d21-d3cb-ec980338c4e8@collabora.com> (raw)
In-Reply-To: <b505827d-252f-4325-db8e-047b8eb9c5fb@infradead.org>

Hello,

On 7/9/20 9:09 PM, Randy Dunlap wrote:
> Hi,
> 
> On 7/9/20 10:59 AM, André Almeida wrote:
>>
>>
>> diff --git a/kernel/futex2.c b/kernel/futex2.c
>> new file mode 100644
>> index 000000000000..b87a10ba7c01
>> --- /dev/null
>> +++ b/kernel/futex2.c
>> @@ -0,0 +1,73 @@
>> +// SPDX-License-Identifier: GPL-2.0-or-later
>> +/*
>> + * futex2 system call interface by André Almeida <andrealmeid@collabora.com>
>> + *
>> + * Copyright 2020 Collabora Ltd.
>> + */
>> +
>> +#include <linux/syscalls.h>
>> +
>> +#include <asm/futex.h>
>> +
>> +/*
>> + * Set of flags that futex2 operates. If we got something that is not in this
>> + * set, it can be a unsupported futex1 operation like BITSET or PI, so we
>> + * refuse to accept
>> + */
>> +#define FUTEX2_MASK (FUTEX_SIZE_MASK | FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
>> +
>> +/**
>> + * sys_futex_wait: Wait on a futex address if (*uaddr) == val
> 
> Function name line should use - as separator, not :, so
>  * sys_futex_wait - Wait on a futex address if (*uaddr) == val
> 
>> + * @uaddr: User address of futex
>> + * @val:   Expected value of futex
>> + * @flags: Checks if futex is private, the size of futex and the clockid
>> + * @timo:  Optional absolute timeout. Supports only 64bit time.
>> + */
>> +SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned long, val,
>> +		unsigned long, flags, struct __kernel_timespec __user *, timo)
>> +{
>   ...
>> +}
>> +
>> +/**
>> + * sys_futex_wake: Wake a number of futexes waiting in an address
> 
> Same here:
>  * sys_futex_wake - Wake a number of futexes waiting in an address
> 
> or could it be "on an address":
>  * sys_futex_wake - Wake a number of futexes waiting on an address
> 
>> + * @uaddr:   Address of futex to be woken up
>> + * @nr_wake: Number of futexes to be woken up
>> + * @flags:   Checks if futex is private and the size of futex
>> + */
>> +SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake,
>> +		unsigned long, flags)
>> +{
> 

Both changes applied for v3, thanks for the feedback.

> 
> thanks.
> 


  reply	other threads:[~2020-07-10  0:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 17:59 [RFC v2 0/4] futex2: Add new futex interface André Almeida
2020-07-09 17:59 ` [RFC v2 1/4] " André Almeida
2020-07-10  0:09   ` Randy Dunlap
2020-07-10  0:19     ` André Almeida [this message]
2020-07-09 17:59 ` [RFC v2 2/4] selftests: futex: Add futex2 wake/wait test André Almeida
2020-07-09 17:59 ` [RFC v2 3/4] selftests: futex: Add futex2 timeout test André Almeida
2020-07-09 17:59 ` [RFC v2 4/4] selftests: futex: Add futex2 wouldblock test André Almeida
2020-07-10 13:23 ` [RFC v2 0/4] futex2: Add new futex interface Oleksandr Natalenko
2020-07-10 13:45   ` André Almeida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d09639f-6821-8d21-d3cb-ec980338c4e8@collabora.com \
    --to=andrealmeid@collabora.com \
    --cc=arnd@arndb.de \
    --cc=dvhart@infradead.org \
    --cc=fweimer@redhat.com \
    --cc=kernel@collabora.com \
    --cc=krisman@collabora.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malteskarupke@web.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pgriffais@valvesoftware.com \
    --cc=rdunlap@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).