Re: [PATCH] select fix

From: Valdis.Kletnieks@vt.edu
Date: Tue Jul 29 2003 - 12:48:36 EST


On Tue, 29 Jul 2003 10:36:30 PDT, Andrew Morton said:

> > - if (tty->driver->chars_in_buffer(tty) < WAKEUP_CHARS)
> > + if (!tty->stopped && tty->driver->chars_in_buffer(tty) < WAKEUP_CHARS)
> > mask |= POLLOUT | POLLWRNORM;
>
> Manfred sent a patch through esterday which addresses it this way:
>
> - if (tty->driver->chars_in_buffer(tty) < WAKEUP_CHARS)
> + if (tty->driver->chars_in_buffer(tty) < WAKEUP_CHARS &&
> + tty->driver->write_room(tty) > 0)
>
> Any preferences?

Would including all 3 conditions make sense? Not sure if it should be A&B&C, or
A&(B|C) though, but it certainly smells like the write_room() and tty->stopped
checks are covering 2 different corner cases....



-
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/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:42 EST