From: Michael Schnell <mschnell@lumino.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org,
Mike Frysinger <vapier.adi@gmail.com>,
Paul Mundt <lethal@linux-sh.org>
Subject: Re: implementing Futex
Date: Fri, 14 Aug 2009 13:55:59 +0200 [thread overview]
Message-ID: <4A8550CF.8000003@lumino.de> (raw)
In-Reply-To: <200908131839.41803.arnd@arndb.de>
Arnd Bergmann wrote:,
>> From reading the code (futex_atomic_op_inuser() seems only to be called
>> once (in futex.c) ), it seems that futex_atomic_op_inuser() is not
>> really used at all. It seems that it'd only called for futex_wake, and
>> here the "Operation" is derived from the last parameter of the system
>> call, which the man page says is ignored. So, are all the operations
>> implemented there really necessary or just "nice to have" ?
>
> You misread futex_wake_op(). The operation comes from the second parameter
> of the syscall, not the last one.
Really ?
In futex.c, I see
static int
futex_wake_op(u32 __user *uaddr1, int fshared, u32 __user *uaddr2,
int nr_wake, int nr_wake2, int op) {
..
retry_private:
op_ret = futex_atomic_op_inuser(op, uaddr2);
..
}
...
long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
u32 __user *uaddr2, u32 val2, u32 val3) {
..
case FUTEX_WAKE_OP:
ret = futex_wake_op(uaddr, fshared, uaddr2,
val, val2, val3);
..
};
...
SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,
struct timespec __user *, utime, u32 __user *, uaddr2,
u32, val3) {
..
return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);
..
}
I don't see that the value in question is modified anywhere in that code.
What am I getting wrong ?
But I also don't see how this makes any sense.
-Michael
next prev parent reply other threads:[~2009-08-14 11:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-13 15:03 implementing Futex Michael Schnell
2009-08-13 16:39 ` Arnd Bergmann
2009-08-13 17:28 ` Arnd Bergmann
2009-08-14 9:46 ` Michael Schnell
2009-08-14 11:44 ` Arnd Bergmann
2009-08-17 8:57 ` Mike Frysinger
2009-08-14 9:48 ` Michael Schnell
[not found] ` <4A8525A1.205@lumino.de>
[not found] ` <200908141128.01179.arnd@arndb.de>
2009-08-14 10:03 ` Michael Schnell
2009-08-14 10:11 ` Michael Schnell
2009-08-14 11:55 ` Michael Schnell [this message]
2009-08-14 12:38 ` Arnd Bergmann
2009-08-14 12:56 ` Michael Schnell
2009-08-14 13:33 ` Arnd Bergmann
2009-08-31 16:30 ` Darren Hart
2009-08-17 8:50 ` Michael Schnell
2009-08-17 11:53 ` [Nios2-dev] " Michael Schnell
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=4A8550CF.8000003@lumino.de \
--to=mschnell@lumino.de \
--cc=arnd@arndb.de \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vapier.adi@gmail.com \
/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