* 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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user