* fhandler.h (fhandler_base::ready_for_read): Remove unused argument.

(fhandler_tty_slave::ready_for_read): Ditto.
(select_record): Remove poll, initialize peek.
* select.cc: Remove all poll functions, throughout.  Change second argument of
peek_* functions to 'bool' throughout.  Specifically initialize *_ready
variables throughout.
(select_stuff::poll): Subsume previous poll functionality.
(peek_pipe): Don't grab guard mutex when in select loop.  select()/read() is
racy by design so there is no need to worry about a race in select().
(fhandler_base::ready_for_read): Remove unused argument.
(fhandler_tty_slave::ready_for_read): Ditto.
* syscalls.cc (_read): Eliminate third argument in ready_for_read call.
This commit is contained in:
Christopher Faylor
2001-11-04 02:31:58 +00:00
parent f41d24a14d
commit 476dfb657b
4 changed files with 128 additions and 162 deletions

View File

@@ -312,7 +312,7 @@ _read (int fd, void *ptr, size_t len)
if (wait && (!cfd->is_slow () || cfd->get_r_no_interrupt ()))
debug_printf ("non-interruptible read\n");
else if (!cfd->ready_for_read (fd, wait, 0))
else if (!cfd->ready_for_read (fd, wait))
{
res = -1;
goto out;