From: Alex Riesen <alexander.riesen@synopsys.COM>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: akpm@zip.com.au, mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Futex minor fixes
Date: Tue, 26 Aug 2003 11:26:31 +0200 [thread overview]
Message-ID: <20030826092631.GN16080@Synopsys.COM> (raw)
In-Reply-To: <20030826031939.F1D762C0FA@lists.samba.org>
Rusty Russell, Tue, Aug 26, 2003 05:05:56 +0200:
> Hi Andrew, Ingo,
>
> This was posted before, but dropped.
>
> Name: Minor futex comment tweaks and cleanups
> Author: Rusty Russell
> Status: Tested on 2.6.0-test4-bk2
>
> D: Changes:
> D:
> D: (1) don't return 0 from futex_wait if we are somehow
> D: spuriously woken up, return -EINTR on any such case,
But the code below does not mean there actually was a signal,
unless I'm missing something.
> - if (time == 0) {
> - ret = -ETIMEDOUT;
> - goto out;
> - }
> - if (signal_pending(current))
> - ret = -EINTR;
> -out:
> - /* Were we woken up anyway? */
> +
> + /* Were we woken up (and removed from queue)? Always return
> + * success when this happens. */
> if (!unqueue_me(&q))
> ret = 0;
> + else if (time == 0)
> + ret = -ETIMEDOUT;
> + else
> + ret = -EINTR;
> +
Here. EINTR is often (if not always) assumed to be caused by a signal.
And someone may rightfully depend on it being that way.
-alex
next prev parent reply other threads:[~2003-08-26 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-26 3:05 [PATCH 1/2] Futex minor fixes Rusty Russell
2003-08-26 9:26 ` Alex Riesen [this message]
2003-08-27 2:40 ` Rusty Russell
2003-08-27 6:50 ` Alex Riesen
2003-08-28 0:49 ` Rusty Russell
2003-08-28 8:08 ` Alex Riesen
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=20030826092631.GN16080@Synopsys.COM \
--to=alexander.riesen@synopsys.com \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rusty@rustcorp.com.au \
/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