[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 14/25 v6] xen/arm: vpl011: Add a new add_console_tty_fd function in xenconsole
On Mon, 17 Jul 2017, Bhupinder Thakur wrote: > This patch introduces a new add_console_tty_fd function. This function > adds the tty fd to the list of polled fds. > > Signed-off-by: Bhupinder Thakur <bhupinder.thakur@xxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> > --- > CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > CC: Wei Liu <wei.liu2@xxxxxxxxxx> > CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> > CC: Julien Grall <julien.grall@xxxxxxx> > > Changes since v5: > - Split this change in a separate patch. > > tools/console/daemon/io.c | 30 +++++++++++++++++------------- > 1 file changed, 17 insertions(+), 13 deletions(-) > > diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c > index dc96203..6321d78 100644 > --- a/tools/console/daemon/io.c > +++ b/tools/console/daemon/io.c > @@ -1069,6 +1069,22 @@ static void add_console_evtchn_fd(struct console *con, > void *data) > *((long long *)data) = next_timeout; > } > > +static void add_console_tty_fd(struct console *con) > +{ > + if (con->master_fd != -1) { > + short events = 0; > + if (!con->d->is_dead && ring_free_bytes(con)) > + events |= POLLIN; > + > + if (!buffer_empty(&con->buffer)) > + events |= POLLOUT; > + > + if (events) > + con->master_pollfd_idx = > + set_fds(con->master_fd, events|POLLPRI); > + } > +} > + > void handle_io(void) > { > int ret; > @@ -1148,19 +1164,7 @@ void handle_io(void) > > add_console_evtchn_fd(con, (void *)&next_timeout); > > - if (con->master_fd != -1) { > - short events = 0; > - if (!d->is_dead && ring_free_bytes(con)) > - events |= POLLIN; > - > - if (!buffer_empty(&con->buffer)) > - events |= POLLOUT; > - > - if (events) > - con->master_pollfd_idx = > - set_fds(con->master_fd, > - events|POLLPRI); > - } > + add_console_tty_fd(con); > } > > /* If any domain has been rate limited, we need to work > -- > 2.7.4 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |