Re: [patch] wake_one for accept(2) [was Re: Overscheduling DOES happen with high web server load.]

Pauline Middelink (middelin@polyware.nl)
Tue, 11 May 1999 08:07:26 +0200


On Tue, May 11, 1999 at 12:58:46AM -0700, David S. Miller wrote:
> Date: Tue, 11 May 1999 02:24:28 +0200 (CEST)
> From: Andrea Arcangeli <andrea@e-mind.com>
>
> - if (t->state == TASK_INTERRUPTIBLE && signal_pending(t))
> + if (t->state & TASK_INTERRUPTIBLE && signal_pending(t))
>
> Andrea, watch out! The presedence rules of C have bitten you here.
>
> You want:
>
> + if ((t->state & TASK_INTERRUPTIBLE) && signal_pending(t))
>
Syntactic sugar, the precedence of & is higher than that of &&
(The C programming language, pp. 53 second edition)

Met vriendelijke groet,
Pauline Middelink

-- 
PGP Key fingerprint = DE 6B D0 D9 19 AD A7 A0  58 A3 06 9D B6 34 39 E2
For more details look at my website http://www.polyware.nl/~middelin

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