lkml.org 
[lkml]   [2003]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] Futex minor fixes
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.090 / U:2.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site